aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantRange.cpp
diff options
context:
space:
mode:
authorRamkumar Ramachandra <ramkumar.ramachandra@codasip.com>2025-02-17 12:30:07 +0000
committerGitHub <noreply@github.com>2025-02-17 12:30:07 +0000
commit8eba128b2dac8e405b663ef602f85469c3d6edb8 (patch)
tree5ed0ef1969b04b252c04134be0395d8611fcf6db /llvm/lib/IR/ConstantRange.cpp
parent9c9157b25662cedd63426f02cdbde7853454b38e (diff)
downloadllvm-8eba128b2dac8e405b663ef602f85469c3d6edb8.zip
llvm-8eba128b2dac8e405b663ef602f85469c3d6edb8.tar.gz
llvm-8eba128b2dac8e405b663ef602f85469c3d6edb8.tar.bz2
ConstRange: exhaustively test makeExactICmpRegion (#127058)
Exhaustively test makeExactICmpRegion by comparing makeAllowedICmpRegion against makeSatisfyingICmpRegion for all APInts.
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r--llvm/lib/IR/ConstantRange.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 41e40cd..e09c139 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -170,11 +170,10 @@ ConstantRange ConstantRange::makeExactICmpRegion(CmpInst::Predicate Pred,
const APInt &C) {
// Computes the exact range that is equal to both the constant ranges returned
// by makeAllowedICmpRegion and makeSatisfyingICmpRegion. This is always true
- // when RHS is a singleton such as an APInt and so the assert is valid.
- // However for non-singleton RHS, for example ult [2,5) makeAllowedICmpRegion
- // returns [0,4) but makeSatisfyICmpRegion returns [0,2).
+ // when RHS is a singleton such as an APInt. However for non-singleton RHS,
+ // for example ult [2,5) makeAllowedICmpRegion returns [0,4) but
+ // makeSatisfyICmpRegion returns [0,2).
//
- assert(makeAllowedICmpRegion(Pred, C) == makeSatisfyingICmpRegion(Pred, C));
return makeAllowedICmpRegion(Pred, C);
}