[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 12 16:43:13 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
SCCP.cpp updated: 1.151 -> 1.152
---
Log message:
Fix a minor bug handling constant exprs, introduced by a recent patch.
---
Diffs of the changes: (+1 -1)
SCCP.cpp | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.151 llvm/lib/Transforms/Scalar/SCCP.cpp:1.152
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.151 Fri Jan 12 01:05:14 2007
+++ llvm/lib/Transforms/Scalar/SCCP.cpp Fri Jan 12 18:42:58 2007
@@ -476,7 +476,7 @@
return true;
} else if (BCValue.isConstant()) {
// Not branching on an evaluatable constant?
- if (BCValue.getConstant()->getType() != Type::Int1Ty) return true;
+ if (!isa<ConstantInt>(BCValue.getConstant())) return true;
// Constant condition variables mean the branch can only go a single way
return BI->getSuccessor(BCValue.getConstant() ==
More information about the llvm-commits
mailing list