llvm-project
3cc1b7c2 - [SeparateConstOffsetFromGEP] Check if non-extracted indices may be negative when preserving inbounds (#159515)

Commit
48 days ago
[SeparateConstOffsetFromGEP] Check if non-extracted indices may be negative when preserving inbounds (#159515) If we know that the initial GEP was inbounds, and we change it to a sequence of GEPs from the same base pointer where every offset is non-negative, then the new GEPs are inbounds. So far, the implementation only checked if the extracted offsets are non-negative. In cases where non-extracted offsets can be negative, this would cause the inbounds flag to be wrongly preserved. Fixes an issue in #130617 found by nikic.
Author
Parents
Loading