[llvm-commits] [llvm] r85903 - /llvm/trunk/lib/Transforms/Scalar/SCCP.cpp

Chris Lattner sabre at nondot.org
Tue Nov 3 08:50:11 PST 2009


Author: lattner
Date: Tue Nov  3 10:50:11 2009
New Revision: 85903

URL: http://llvm.org/viewvc/llvm-project?rev=85903&view=rev
Log:
fix a subtle bug I introduced when refactoring SCCP.  Testcase
to follow.

Modified:
    llvm/trunk/lib/Transforms/Scalar/SCCP.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=85903&r1=85902&r2=85903&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Tue Nov  3 10:50:11 2009
@@ -107,7 +107,7 @@
 
   /// markConstant - Return true if this is a change in status.
   bool markConstant(Constant *V) {
-    if (isConstant()) {
+    if (getLatticeValue() == constant) { // Constant but not forcedconstant.
       assert(getConstant() == V && "Marking constant with different value");
       return false;
     }





More information about the llvm-commits mailing list