[Bug rtl-optimization/49330] Integer arithmetic on addresses optimised with pointer arithmetic rules
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 4 07:07:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
IMHO as RTL drops the difference between pointers and integers (of the same
mode)
it has to drop the assumption that pointer arithmetic has to stay inside a
pointed-to object similar to how it has to drop reliance on undefined overflow
for optimization since it drops the notion of signedness.
The other choice may seem to take REG_POINTER setting conservative and only
have the assumption on REG_POINTER regs. (and thus make sure to set
REG_POINTER and MEM_POINTER conservatively, which may be a difficult task on
its own)
More information about the Gcc-bugs
mailing list