aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2021-06-25 14:43:13 -0700
committerEli Friedman <efriedma@quicinc.com>2021-06-25 14:43:13 -0700
commit8d5bf0709da893cee20f9b3100bf1bcd4a5f0210 (patch)
treeb2dbe8d0741a89acd0a7eb6f8848cff55354a4f5 /llvm/lib/Analysis/ValueTracking.cpp
parentc8d0d8a8a16e52bc0d6856f36065f46da19b1713 (diff)
downloadllvm-8d5bf0709da893cee20f9b3100bf1bcd4a5f0210.zip
llvm-8d5bf0709da893cee20f9b3100bf1bcd4a5f0210.tar.gz
llvm-8d5bf0709da893cee20f9b3100bf1bcd4a5f0210.tar.bz2
[NFC] Prefer ConstantRange::makeExactICmpRegion over makeAllowedICmpRegion
The implementation is identical, but it makes the semantics a bit more obvious.
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 276a5a4..e877fb1 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -6465,8 +6465,7 @@ isImpliedCondMatchingImmOperands(CmpInst::Predicate APred,
const ConstantInt *C2) {
ConstantRange DomCR =
ConstantRange::makeExactICmpRegion(APred, C1->getValue());
- ConstantRange CR =
- ConstantRange::makeAllowedICmpRegion(BPred, C2->getValue());
+ ConstantRange CR = ConstantRange::makeExactICmpRegion(BPred, C2->getValue());
ConstantRange Intersection = DomCR.intersectWith(CR);
ConstantRange Difference = DomCR.difference(CR);
if (Intersection.isEmptySet())