[InstCombine] Fix inbounds preservation when merging GEPs (PR55722)
Even if the total offset is inbounds, we might represent it by first performing a large negative offset and then a small positive one. With inbounds semantics as currently specified, each offset must be inbounds individually, not just the overall offset of the GEP. Fix this by checking that the sign of all offsets is the same. Fixes https://github.com/llvm/llvm-project/issues/55722.
parent
b501503c
Please register or sign in to comment