[Bug rtl-optimization/111626] missed optimization combining offset of array member in struct with offset inside the array
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 28 19:52:38 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111626
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|middle-end |rtl-optimization
Severity|normal |enhancement
Ever confirmed|0 |1
Last reconfirmed| |2023-09-28
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Combine is able to do the combining (which is why it works on x86_64) but then
the split does not work:
Trying 10, 11, 12 -> 13:
10: r198:DI=r204:DI+0x10
REG_DEAD r204:DI
11: r200:DI=r198:DI<<0x2
REG_DEAD r198:DI
12: r199:DI=r203:DI+r200:DI
REG_DEAD r203:DI
REG_DEAD r200:DI
13: r201:SI=[r199:DI+0x4]
REG_DEAD r199:DI
Failed to match this instruction:
(set (reg:SI 201 [ arr_2(D)->arrD.2228[1][idx_3(D)] ])
(mem:SI (plus:DI (plus:DI (mult:DI (reg:DI 204)
(const_int 4 [0x4]))
(reg:DI 203))
(const_int 68 [0x44])) [1 arr_2(D)->arrD.2228[1][idx_3(D)]+0 S4
A32]))
Failed to match this instruction:
(set (reg/f:DI 199)
(plus:DI (ashift:DI (reg:DI 204)
(const_int 2 [0x2]))
(reg:DI 203)))
More information about the Gcc-bugs
mailing list