aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/DCE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/DCE.cpp')
-rw-r--r--lib/Transforms/Scalar/DCE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp
index 8e37279..fa2c9c7 100644
--- a/lib/Transforms/Scalar/DCE.cpp
+++ b/lib/Transforms/Scalar/DCE.cpp
@@ -91,7 +91,7 @@ static bool RemoveSingularPHIs(BasicBlock *BB) {
do {
PHINode *PN = (PHINode*)I;
- assert(PN->getOperand(2) == 0 && "PHI node should only have one value!");
+ assert(PN->getNumOperands() == 2 && "PHI node should only have one value!");
Value *V = PN->getOperand(0);
PN->replaceAllUsesWith(V); // Replace PHI node with its single value.