aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-05-30 17:09:40 +0200
committerNikita Popov <npopov@redhat.com>2022-05-31 15:45:02 +0200
commit36cbdaa163bd4250923eff0812f0e84ca129347e (patch)
tree0c5f8c4d54e74c89da2504f7c1436c70972e16c8 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent858e6273d938cc4d08ee053ddff3fe7b19eb302a (diff)
downloadllvm-36cbdaa163bd4250923eff0812f0e84ca129347e.zip
llvm-36cbdaa163bd4250923eff0812f0e84ca129347e.tar.gz
llvm-36cbdaa163bd4250923eff0812f0e84ca129347e.tar.bz2
[InstCombine] Fix inbounds preservation when swapping GEPs (PR44206)
When reassociating GEPs, we can only keep inbounds if both original GEPs were inbounds, and their offsets have the same sign. For the sake of simplicity, I only handle the case where both offsets are non-negative here. It would probably be fine to just not preserve inbounds at all here, but as I don't see a compile-time impact for adding the isKnownNonNegative() calls I went with this more conservative approach. Fixes https://github.com/llvm/llvm-project/issues/44206. Differential Revision: https://reviews.llvm.org/D126687
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions