[all-commits] [llvm/llvm-project] 872d69: [InstCombine] Fix inbounds preservation when mergi...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue May 31 02:54:19 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 872d69e5d4e251bd70c6cf5dbf1b3ea34f976aa2
https://github.com/llvm/llvm-project/commit/872d69e5d4e251bd70c6cf5dbf1b3ea34f976aa2
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-05-31 (Tue, 31 May 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll
Log Message:
-----------
[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.
More information about the All-commits
mailing list