regrename creates invalid insn
Ian Lance Taylor
iant@google.com
Mon Mar 12 20:52:00 GMT 2012
Andreas Schwab <schwab@linux-m68k.org> writes:
> When regrename runs it turns it into this:
>
> (insn 6 27 7 2 (parallel [
> (set (reg:SI 1 %d1 [35])
> (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 1 %d1 [36]))
> (const_int -2004318071 [0x88888889]))
> (const_int 32 [0x20]))))
> (clobber (reg:SI 1 %d1 [36]))
> ]) mulsl.c:4 192 {const_smulsi3_highpart}
> (expr_list:REG_UNUSED (reg:SI 1 %d1 [36])
> (nil)))
>
> Note that both output operands are allocated to the same register (which
> generates a muls.l producing undefined results). Is this transformation
> actually valid? I can stop regrename from doing this by marking operand
> 0 as earlyclobber, but the insn doesn't actually write the outputs
> before reading the inputs, the issue is the dependency between the
> outputs.
I assume there were two different hard register numbers before
regrename. That does not look like a valid transformation to me.
But it also looks like the pattern should use a match_scratch.
Ian
More information about the Gcc
mailing list