This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/52573] New: [4.5/4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands
- From: "schwab at linux-m68k dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Mar 2012 23:49:58 +0000
- Subject: [Bug rtl-optimization/52573] New: [4.5/4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52573
Bug #: 52573
Summary: [4.5/4.6/4.7/4.8 regression] regrename creates
overlapping register allocations for output operands
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schwab@linux-m68k.org
Target: m86k-*
gcc.c-torture/execute/20040709-1.c when compiled with -O3 -funroll-loops (which
enables -frename-registers) generates:
muls.l #-2004318071,%d1:%d1
which produces undefined results. regrename transforms
(insn 118 200 119 7 (parallel [
(set (reg:SI 1 %d1 [235])
(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 3
%d3 [236]))
(const_int -2004318071 [0x88888889]))
(const_int 32 [0x20]))))
(clobber (reg:SI 3 %d3 [236]))
]) ../gcc/gcc/testsuite/gcc.c-torture/execute/20040709-1.c:91 192
{const_smulsi3_highpart}
(expr_list:REG_DEAD (reg:SI 3 %d3 [236])
(expr_list:REG_UNUSED (reg:SI 3 %d3 [236])
(nil))))
into
(insn 118 200 119 7 (parallel [
(set (reg:SI 1 %d1 [235])
(truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 1
%d1 [236]))
(const_int -2004318071 [0x88888889]))
(const_int 32 [0x20]))))
(clobber (reg:SI 1 %d1 [236]))
]) ../gcc/gcc/testsuite/gcc.c-torture/execute/20040709-1.c:91 192
{const_smulsi3_highpart}
(expr_list:REG_DEAD (reg:SI 3 %d3 [236])
(expr_list:REG_UNUSED (reg:SI 3 %d3 [236])
(nil))))
The simplified testcase:
int mod (int a) { return a % 15; }
reproduces the bug with 4.5 and 4.6, though not with 4.7/4.8.