[all-commits] [llvm/llvm-project] aaeae8: [InstSimplify] add tests for icmp with no-wrap add...
RotateRight via All-commits
all-commits at lists.llvm.org
Tue Dec 28 06:52:09 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aaeae842ef821063c5c6ce5fada4e62967c14b96
https://github.com/llvm/llvm-project/commit/aaeae842ef821063c5c6ce5fada4e62967c14b96
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-12-28 (Tue, 28 Dec 2021)
Changed paths:
M llvm/test/Transforms/InstSimplify/icmp-constant.ll
Log Message:
-----------
[InstSimplify] add tests for icmp with no-wrap add operand; NFC
Commit: 0edf99950e6234159c99710838f21d3629d756af
https://github.com/llvm/llvm-project/commit/0edf99950e6234159c99710838f21d3629d756af
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-12-28 (Tue, 28 Dec 2021)
Changed paths:
M llvm/include/llvm/Analysis/ValueTracking.h
M llvm/lib/Analysis/BasicAliasAnalysis.cpp
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
M llvm/test/Transforms/InstCombine/minmax-intrinsics.ll
M llvm/test/Transforms/InstSimplify/icmp-constant.ll
M llvm/unittests/Analysis/ValueTrackingTest.cpp
Log Message:
-----------
[Analysis] allow caller to choose signed/unsigned when computing constant range
We should not lose analysis precision if an 'add' has both no-wrap
flags (nsw and nuw) compared to just one or the other.
This patch is modeled on a similar construct that was added with
D59386.
I don't think it is possible to expose a problem with an unsigned
compare because of the way this was coded (nuw is handled first).
InstCombine has an assert that fires with the example from:
https://github.com/llvm/llvm-project/issues/52884
...because it was expecting InstSimplify to handle this kind of
pattern with an smax.
Fixes #52884
Differential Revision: https://reviews.llvm.org/D116322
Compare: https://github.com/llvm/llvm-project/compare/c2275278c693...0edf99950e62
More information about the All-commits
mailing list