public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/52573] New: [4.5/4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands
@ 2012-03-12 23:50 schwab@linux-m68k.org
  2012-03-13  8:30 ` [Bug rtl-optimization/52573] " rguenth at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: schwab@linux-m68k.org @ 2012-03-12 23:50 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-01-24  9:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 23:50 [Bug rtl-optimization/52573] New: [4.5/4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands schwab@linux-m68k.org
2012-03-13  8:30 ` [Bug rtl-optimization/52573] " rguenth at gcc dot gnu.org
2012-03-14 10:47 ` schwab@linux-m68k.org
2012-04-13 12:59 ` rguenth at gcc dot gnu.org
2012-04-13 13:02 ` bernds at gcc dot gnu.org
2012-06-10 20:29 ` mikpe at it dot uu.se
2012-07-02 11:32 ` rguenth at gcc dot gnu.org
2012-12-07  0:14 ` [Bug rtl-optimization/52573] [4.6/4.7/4.8 " aoliva at gcc dot gnu.org
2012-12-07 11:17 ` aoliva at gcc dot gnu.org
2012-12-07 13:39 ` zadeck at naturalbridge dot com
2012-12-07 16:46 ` schwab@linux-m68k.org
2012-12-08 19:06 ` mikpe at it dot uu.se
2012-12-08 19:32 ` schwab@linux-m68k.org
2013-01-16  4:57 ` law at redhat dot com
2013-01-16 20:40 ` schwab@linux-m68k.org
2013-01-18  7:55 ` law at gcc dot gnu.org
2013-01-18  7:56 ` law at redhat dot com
2013-01-24  9:38 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).