https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69689

            Bug ID: 69689
           Summary: gcc.target/i386/addr-sel-1.c FAILs with PR69274 fix
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
            Blocks: 69274
  Target Milestone: ---
            Target: i?86-*-*

With

Index: gcc/ira.c
===================================================================
--- gcc/ira.c   (revision 231814)
+++ gcc/ira.c   (working copy)
@@ -1888,10 +1888,11 @@ ira_setup_alts (rtx_insn *insn, HARD_REG
        }
       if (commutative < 0)
        break;
-      if (curr_swapped)
-       break;
+      /* Swap forth and back to avoid changing recog_data.  */
       std::swap (recog_data.operand[commutative],
                 recog_data.operand[commutative + 1]);
+      if (curr_swapped)
+       break;
     }
 }

I see

FAIL: gcc.target/i386/addr-sel-1.c scan-assembler b\\\\+1

where we fail to reload_combine

(insn 6 21 8 2 (parallel [
            (set (reg:SI 1 dx [orig:87 _2 ] [87])
                (plus:SI (reg:SI 0 ax [99])
                    (const_int 1 [0x1])))
            (clobber (reg:CC 17 flags))
        ])
/space/rguenther/src/svn/trunk3/gcc/testsuite/gcc.target/i386/addr-sel-1.c:13
218 {*addsi_1}
     (nil))
...
(insn 10 8 11 2 (set (reg:SI 1 dx [98])
        (sign_extend:SI (mem/j:QI (plus:SI (reg:SI 1 dx [orig:87 _2 ] [87])
                    (symbol_ref:SI ("b") [flags 0x2]  <var_decl 0x7faa46f94d80
b>)) [0 b S1 A8])))
/space/rguenther/src/svn/trunk3/gcc/testsuite/gcc.target/i386/addr-sel-1.c:13
151 {extendqisi2}
     (nil))

probably because dx dies in the same instruction it is used in.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69274
[Bug 69274] [6 Regression] 435.gromacs performance regression  after r231814 on
x86 Haswell and bdver2

Reply via email to