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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com,
                   |                            |uros at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Looks like a bug in the x86_cse pass.
Before that pass we have
(insn 27 25 28 6 (set (reg:HI 124)
        (const_int 1542 [0x606])) "pr128690.c":33:11 101 {*movhi_internal}
     (nil))
(insn 28 27 29 6 (set (reg:V2QI 125)
        (mem/u/c:V2QI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0  S2 A16]))
"pr128690.c":33:15 -1
     (expr_list:REG_EQUAL (const_vector:V2QI [
                (const_int -1 [0xffffffffffffffff]) repeated x2
            ])
        (nil)))
...
(insn 30 29 32 6 (parallel [
            (set (subreg:V2QI (reg:HI 126 [ vect__7.21 ]) 0)
                (plus:V2QI (subreg:V2QI (reg:HI 124) 0)
                    (reg:V2QI 125)))
            (clobber (reg:CC 17 flags))
        ]) "pr128690.c":33:8 2296 {addv2qi3}
     (expr_list:REG_EQUAL (const_vector:V2QI [
                (const_int 5 [0x5]) repeated x2
            ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_DEAD (reg:HI 124)
                (expr_list:REG_DEAD (reg:V2QI 125)
                    (nil))))))
That pass changes that to:
(insn 30 29 32 6 (set (reg:HI 126 [ vect__7.21 ])
        (const_int 1285 [0x505])) "pr128690.c":33:8 101 {*movhi_internal}
     (expr_list:REG_EQUAL (const_vector:V2QI [
                (const_int 5 [0x5]) repeated x2
            ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_DEAD (reg:HI 124)
                (expr_list:REG_DEAD (reg:V2QI 125)
                    (nil))))))
The bug is that it didn't throw away (or at least adjusted) the REG_EQUAL note
after changing the SET_DEST mode.  And then during RA we try to use that
REG_EQUAL note and ICE.

Reply via email to