[Bug rtl-optimization/52573] [4.5/4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands
mikpe at it dot uu.se
gcc-bugzilla@gcc.gnu.org
Sun Jun 10 20:29:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52573
--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2012-06-10 20:29:29 UTC ---
Created attachment 27601
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27601
test case reduced from gcc.c-torture/execute/20040709-1.c
With this test case I can reproduce the bug with gcc-4.8-20120603 -O2
-frename-registers, configured as a cross from i686-linux to m68k-linux.
Looking at the tree and rtl dump files I first see the erroneous note in
202r.dse2; 201r.pro_and_epilogue has
(insn 19 43 20 2 (parallel [
(set (reg:SI 1 %d1 [56])
(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 2
%d2 [57]))
(const_int -2004318071 [0x88888889]))
(const_int 32 [0x20]))))
(clobber (reg:SI 2 %d2 [57]))
]) pr52573.c:12 192 {const_smulsi3_highpart}
(nil))
but 202r.dse2 has
(insn 19 43 20 2 (parallel [
(set (reg:SI 1 %d1 [56])
(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 2
%d2 [57]))
(const_int -2004318071 [0x88888889]))
(const_int 32 [0x20]))))
(clobber (reg:SI 2 %d2 [57]))
]) pr52573.c:12 192 {const_smulsi3_highpart}
(expr_list:REG_DEAD (reg:SI 2 %d2 [57])
(expr_list:REG_UNUSED (reg:SI 2 %d2 [57])
(nil))))
and in the final .s file there is the invalid
muls.l #-2004318071,%d1:%d1
More information about the Gcc-bugs
mailing list