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

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #1)
> Confirmed.
> 
> Looks like an ext_dce issue.
> (insn 111 50 51 9 (set (reg:SI 140 [ prephitmp_32 ])
>         (zero_extend:SI (subreg:QI (reg:SI 108 [ pretmp_47 ]) 0))) 114
> {*zero_extendqisi2_aarch64}
>      (nil))
> 
> Being turned into:
> (insn 111 50 51 9 (set (reg:SI 140 [ prephitmp_32 ])
>         (zero_extend:SI (subreg:QI (reg:SI 108 [ pretmp_47 ]) 0))) 114
> {*zero_extendqisi2_aarch64}
>      (nil))

Sorry I Mean turning into:
(insn 150 62 63 9 (set (reg:SI 140 [ prephitmp_32 ])
        (reg:SI 108 [ pretmp_47 ])) 69 {*movsi_aarch64}
     (nil))

108 was defined as:
```
(insn 16 14 19 2 (set (reg:SI 108 [ pretmp_47 ])
        (zero_extend:SI (mem/c:HI (lo_sum:DI (reg/f:DI 113)
                    (symbol_ref:DI ("*.LANCHOR1") [flags 0x182])) [2 g7+0 S2
A16]))) :29:13 116 {*zero_extendhisi2_aarch64}
     (expr_list:REG_DEAD (reg/f:DI 113)
        (expr_list:REG_EQUAL (zero_extend:SI (mem/c:HI (symbol_ref:DI
("*.LANCHOR1") [flags 0x182]) [2 g7+0 S2 A16]))
            (nil))))
```

Which seems like a mode change was missed.
That is the original load was in HImode zero extended into SI mode.
And then 140 is basically &0xff of that load.

Reply via email to