On Wed, 2 Jul 2014, Tom de Vries wrote:
On 02-07-14 08:23, Marc Glisse wrote:
I think it could have used (match_dup 0) instead of operand 1, if there
had been only the first alternative. And then the constraint would have
been +&.
isn't that explicitly listed as unsupported here (
https://gcc.gnu.org/onlinedocs/gccint/RTL-Template.html#index-match_005fdup-3244
):
...
Note that match_dup should not be used to tell the compiler that a particular
register is being used for two operands (example: add that adds one register
to another; the second register is both an input operand and the output
operand). Use a matching constraint (see Simple Constraints) for those.
match_dup is for the cases where one operand is used in two places in the
template, such as an instruction that computes both a quotient and a
remainder, where the opcode takes two input operands but the RTL template has
to refer to each of those twice; once for the quotient pattern and once for
the remainder pattern.
...
?
Well, looking for instance at x86_shrd... Ok, I didn't know it wasn't
supported (though I did suggest using match_operand and "0" at some
point).
Still, the meaning of +&, in inline asm for instance, seems relatively
clear, no?
--
Marc Glisse