[llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp

Reid Spencer reid at x10sys.com
Wed Feb 28 11:58:00 PST 2007



Changes in directory llvm/lib/Transforms/Scalar:

CorrelatedExprs.cpp updated: 1.53 -> 1.54
---
Log message:

For PR1205: http://llvm.org/PR1205 :
Remove ConstantInt from ConstantRange interface and adjust its users to
compensate.


---
Diffs of the changes:  (+4 -1)

 CorrelatedExprs.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.53 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.54
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.53	Wed Feb 28 12:57:32 2007
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp	Wed Feb 28 13:57:34 2007
@@ -1018,7 +1018,10 @@
 
     // 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).






More information about the llvm-commits mailing list