diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index 05b38bb9931..0c785367168 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -174,7 +174,7 @@ void StrongPHIElimination::computeDFS(MachineFunction& MF) { } bool inserted = false; - for (MachineDomTreeNode::iterator I = node->begin(), E = node->end(); + for (MachineDomTreeNode::iterator I = currNode->begin(), E = currNode->end(); I != E; ++I) if (!frontier.count(*I) && !visited.count(*I)) { worklist.push_back(*I);