Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rtl-optimization/113255 - avoid re-associating REG_POINTER MINUS
The following avoids re-associating (minus:DI (reg/f:DI 119) (minus:DI (reg/f:DI 120) (reg/f:DI 114))) into (minus:DI (plus:DI (reg/f:DI 114) (reg/f:DI 119)) (reg/f:DI 120)) as that possibly confuses the REG_POINTER heuristics of RTL alias analysis. This happens to miscompile the PRs testcase during DSE which expands addresses via CSELIB which eventually simplifies what it substituted to. The original code does the innocent ptr - (ptr2 - ptr2'), bias a pointer by the difference of two other pointers.
- Loading branch information