[Bug tree-optimization/102391] Failure to optimize adjacent 8-bit loads into a single bigger load
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 20 08:42:58 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102391
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
the bswap pass is in principle able to handle these but it sees
_1 = (sizetype) offset_12(D);
_2 = RomHeader_13(D) + _1;
_3 = *_2;
_4 = (signed short) _3;
_5 = _1 + 1;
_6 = RomHeader_13(D) + _5;
_7 = *_6;
so the constant offset is not forwarded to the MEM_REFs (int vs. size_t issue)
and the bswap pass doesn't perform any fancy dataref analysis to spot
constant offsetted same bases (it could simply use split_constant_offset
on the found base I guess or invoke DR analysis in BB mode).
More information about the Gcc-bugs
mailing list