Useless clobber?

Richard Henderson rth@cygnus.com
Tue Apr 11 22:04:00 GMT 2000


On Tue, Apr 11, 2000 at 04:14:19PM -0400, John Wehle wrote:
> >> (define_insn ""
> >>   [(set (match_operand:SI 0 "register_operand" "=d")
> >>         (mult:SI
> >>           (zero_extend:SI
> >>             (match_operand:HI 1 "register_operand" "d"))
> >>           (zero_extend:SI
> >>             (match_operand 2 "register_operand" "d"))))
> >>    ( clobber (match_operand:SI 3 "register_operand" "d"))]
> >>   ""
> >>   "impyuu\\t%1,%2,%0")
> >
> Sigh, I spoke too soon.  It isn't odd at all.

Actually, the thing that's odd is that operand 3 is not
referenced in the output template. 

There does not appear to be a constraint between operand 0 and
operand 3, which ought to rule out a hidden DImode output.
Of course, if this insn were only matched after a post-reload
splitter, that would not matter, as the splitter could arrange
for operand 3 to be correct.

>From just this one pattern, and knowing nothing about the
target system, the clobber appears to be useless.  Whether
that is also true in context of the rest of the md must be
left as an excersize for the reader.


r~


More information about the Gcc mailing list