Skip to content
Snippets Groups Projects
Commit b7368500 authored by Chris Lattner's avatar Chris Lattner
Browse files

- Fix bug: cee/2002-10-07-NoImmediateDominator.ll

llvm-svn: 4081
parent caf5b504
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,8 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) { ...@@ -118,7 +118,8 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
// The new block is not the immediate dominator for any other nodes, but // The new block is not the immediate dominator for any other nodes, but
// TINode is the immediate dominator for the new node. // TINode is the immediate dominator for the new node.
// //
DT->createNewNode(NewBB, TINode); if (TINode) // Don't break unreachable code!
DT->createNewNode(NewBB, TINode);
} }
} }
......
...@@ -118,7 +118,8 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) { ...@@ -118,7 +118,8 @@ void SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
// The new block is not the immediate dominator for any other nodes, but // The new block is not the immediate dominator for any other nodes, but
// TINode is the immediate dominator for the new node. // TINode is the immediate dominator for the new node.
// //
DT->createNewNode(NewBB, TINode); if (TINode) // Don't break unreachable code!
DT->createNewNode(NewBB, TINode);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment