aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-03 16:50:11 +0000
committerChris Lattner <sabre@nondot.org>2009-11-03 16:50:11 +0000
commitc175e5de2dbb04e835b13f0554a7ba2f25ba4fc3 (patch)
tree1ed83d83a90681c94f2ebbdede32d1272c7cf87a
parentb908f8ad6a38d989c7f769e329d778e563c398f4 (diff)
fix a subtle bug I introduced when refactoring SCCP. Testcase
to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85903 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index fb6101b0b9..2ee4bbc95b 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -107,7 +107,7 @@ public:
/// 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;
}