summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-28 19:57:34 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-28 19:57:34 +0000
commit3a7e9d8e75e8b07c73a9773a309f9ef8c5fb07c5 (patch)
tree6ba73a8d31ae3ec2c754b1bbefb6f77ade634ca0 /llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
parent8774fe816a2132e3c3f82a94461d02b13f8a57c6 (diff)
downloadbcm5719-llvm-3a7e9d8e75e8b07c73a9773a309f9ef8c5fb07c5.tar.gz
bcm5719-llvm-3a7e9d8e75e8b07c73a9773a309f9ef8c5fb07c5.zip
For PR1205:
Remove ConstantInt from ConstantRange interface and adjust its users to compensate. llvm-svn: 34758
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
index 7942636da78..277a1284eac 100644
--- a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -1018,7 +1018,10 @@ void CEE::ComputeReplacements(RegionInfo &RI) {
// If we know that this value is a particular constant, set Replacement to
// the constant...
- Value *Replacement = VI.getBounds().getSingleElement();
+ Value *Replacement = 0;
+ const APInt * Rplcmnt = VI.getBounds().getSingleElement();
+ if (Rplcmnt)
+ Replacement = ConstantInt::get(*Rplcmnt);
// If this value is not known to be some constant, figure out the lowest
// rank value that it is known to be equal to (if anything).
OpenPOWER on IntegriCloud