summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-28 18:57:32 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-28 18:57:32 +0000
commit56f784d12d00a0a9d93c9ef860141e0595d31828 (patch)
treea1b30ce625dffbe464766e692ec09de15f1d4c37 /llvm/lib/Transforms/Scalar
parent440995bd9a9f19ff152798a841c3621293b6738b (diff)
downloadbcm5719-llvm-56f784d12d00a0a9d93c9ef860141e0595d31828.tar.gz
bcm5719-llvm-56f784d12d00a0a9d93c9ef860141e0595d31828.zip
For PR1205:
First round of ConstantRange changes. This makes all CR constructors use only APInt and not use ConstantInt. Clients are adjusted accordingly. llvm-svn: 34756
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
index fe122c456c4..7942636da78 100644
--- a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -1150,7 +1150,7 @@ Relation::KnownResult CEE::getCmpResult(CmpInst *CI,
//
if (ConstantInt *C = dyn_cast<ConstantInt>(Op1)) {
// Check to see if we already know the result of this comparison...
- ConstantRange R = ConstantRange(predicate, C);
+ ConstantRange R = ConstantRange(predicate, C->getValue());
ConstantRange Int = R.intersectWith(Op0VI->getBounds(),
ICmpInst::isSignedPredicate(ICmpInst::Predicate(predicate)));
@@ -1197,7 +1197,7 @@ bool Relation::contradicts(unsigned Op,
if (ConstantInt *C = dyn_cast<ConstantInt>(Val))
if (Op >= ICmpInst::FIRST_ICMP_PREDICATE &&
Op <= ICmpInst::LAST_ICMP_PREDICATE)
- if (ConstantRange(Op, C).intersectWith(VI.getBounds(),
+ if (ConstantRange(Op, C->getValue()).intersectWith(VI.getBounds(),
ICmpInst::isSignedPredicate(ICmpInst::Predicate(Op))).isEmptySet())
return true;
@@ -1255,8 +1255,9 @@ bool Relation::incorporate(unsigned Op, ValueInfo &VI) {
if (ConstantInt *C = dyn_cast<ConstantInt>(Val))
if (Op >= ICmpInst::FIRST_ICMP_PREDICATE &&
Op <= ICmpInst::LAST_ICMP_PREDICATE)
- VI.getBounds() = ConstantRange(Op, C).intersectWith(VI.getBounds(),
- ICmpInst::isSignedPredicate(ICmpInst::Predicate(Op)));
+ VI.getBounds() =
+ ConstantRange(Op, C->getValue()).intersectWith(VI.getBounds(),
+ ICmpInst::isSignedPredicate(ICmpInst::Predicate(Op)));
switch (Rel) {
default: assert(0 && "Unknown prior value!");
OpenPOWER on IntegriCloud