diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 07:54:15 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 07:54:15 +0000 |
commit | a6e8a955d6ab82911a1909fac7a9f4256a4d090e (patch) | |
tree | 679bee028efe0c335cf9b2dded0c8832caadf709 /lib/Transforms/Scalar/CorrelatedExprs.cpp | |
parent | cda067bad95654d970e14d3555f4aa685e5ebcae (diff) |
Remove the "isSigned" parameters from ConstantRange. It turns out they
are not needed as the results are the same with or without it.
Patch by Nicholas Lewycky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CorrelatedExprs.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CorrelatedExprs.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index d9843a52b5..9a28c5e8ef 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -1156,8 +1156,7 @@ Relation::KnownResult CEE::getCmpResult(CmpInst *CI, // Check to see if we already know the result of this comparison... ICmpInst::Predicate ipred = ICmpInst::Predicate(predicate); ConstantRange R = ICmpInst::makeConstantRange(ipred, C->getValue()); - ConstantRange Int = R.intersectWith(Op0VI->getBounds(), - ICmpInst::isSignedPredicate(ipred)); + ConstantRange Int = R.intersectWith(Op0VI->getBounds()); // If the intersection of the two ranges is empty, then the condition // could never be true! @@ -1203,8 +1202,8 @@ bool Relation::contradicts(unsigned Op, if (Op >= ICmpInst::FIRST_ICMP_PREDICATE && Op <= ICmpInst::LAST_ICMP_PREDICATE) { ICmpInst::Predicate ipred = ICmpInst::Predicate(Op); - if (ICmpInst::makeConstantRange(ipred, C->getValue()).intersectWith( - VI.getBounds(), ICmpInst::isSignedPredicate(ipred)).isEmptySet()) + if (ICmpInst::makeConstantRange(ipred, C->getValue()) + .intersectWith(VI.getBounds()).isEmptySet()) return true; } @@ -1264,8 +1263,8 @@ bool Relation::incorporate(unsigned Op, ValueInfo &VI) { Op <= ICmpInst::LAST_ICMP_PREDICATE) { ICmpInst::Predicate ipred = ICmpInst::Predicate(Op); VI.getBounds() = - ICmpInst::makeConstantRange(ipred, C->getValue()).intersectWith( - VI.getBounds(), ICmpInst::isSignedPredicate(ipred)); + ICmpInst::makeConstantRange(ipred, C->getValue()) + .intersectWith(VI.getBounds()); } switch (Rel) { |