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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think this goes wrong during combine, auto-inc-dec makes
(insn 29 6 7 2 (set (reg/f:DI 106)
        (reg/f:DI 97)) "pr94873.c":11:48 -1
     (expr_list:REG_DEAD (reg/f:DI 97)
        (nil)))
(insn 7 29 8 2 (set (reg:TI 95 [ D.3590 ])
        (mem/u/c:TI (post_inc:DI (reg/f:DI 106)) [0  S16 A128]))
"pr94873.c":11:48 58 {*movti_aarch64}
     (expr_list:REG_INC (reg/f:DI 106)
        (expr_list:REG_EQUAL (const_wide_int 0x0f4409395252b9560)
            (nil))))
...
(insn 19 18 20 2 (set (reg:DI 0 x0)
        (reg/f:DI 106)) "pr94873.c":13:5 53 {*movdi_aarch64}
     (expr_list:REG_DEAD (reg/f:DI 106)
        (expr_list:REG_EQUAL (const:DI (plus:DI (symbol_ref:DI ("*.LANCHOR0")
[flags 0x182])
                    (const_int 16 [0x10])))
            (nil))))
where pseudo 97 holds .LANCHOR0 address, at which there is the 16-byte constant
followed by the string literal.
But combine optimizes that REG_INC insn away and we end up with
(insn 19 18 20 2 (set (reg:DI 0 x0)
        (lo_sum:DI (reg/f:DI 98)
            (symbol_ref:DI ("*.LANCHOR0") [flags 0x182]))) "pr94873.c":13:5
1054 {add_losym_di}
     (expr_list:REG_DEAD (reg/f:DI 98)
        (expr_list:REG_EQUAL (const:DI (plus:DI (symbol_ref:DI ("*.LANCHOR0")
[flags 0x182])
                    (const_int 16 [0x10])))
            (nil))))
as you can see, the actual value in the insn isn't equal to what REG_EQUAL note
says.

Reply via email to