[Bug rtl-optimization/81423] [6/7/8 Regression] Wrong code at -O2

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 17 09:35:00 GMT 2017


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

--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> ---
There are a few issues here.

1) I cannot reproduce it: a trunk x86_64-linux compiler stores to
memory in that insn 20 (the testcase from comment 3).

2) 17, 18 -> 19 should already match.  Instead we get

Trying 17, 18 -> 19:
Failed to match this instruction:
(parallel [
        (set (reg:SI 114)
            (lshiftrt:SI (subreg:SI (reg:DI 109) 0)
                (plus:QI (subreg:QI (ior:SI (subreg:SI (reg:DI 111 [ ull2 ]) 0)
                            (const_int -8651009 [0xffffffffff7bfeff])) 0)
                    (const_int 5 [0x5]))))
        (clobber (reg:CC 17 flags))
    ])

If the subreg:QI there was simplified properly (to just 0xff) the
plus:QI could be simplified as well.

3) The reported issue.  Confirmed.


More information about the Gcc-bugs mailing list