projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1398421
)
Make sure to update the CFG correctly if a switch only has a default dest.
author
Chris Lattner
<sabre@nondot.org>
Mon, 12 Jun 2006 18:25:29 +0000
(18:25 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 12 Jun 2006 18:25:29 +0000
(18:25 +0000)
This fixes CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28755
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 0a9cb637b477bf971b8734e557d7c349dc49a4f9..1c8714d7d3e8e2caa23e5fa47397aa5273854174 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@
-869,6
+869,7
@@
void SelectionDAGLowering::visitSwitch(SwitchInst &I) {
if (DefaultMBB != NextBlock)
DAG.setRoot(DAG.getNode(ISD::BR, MVT::Other, getRoot(),
DAG.getBasicBlock(DefaultMBB)));
+ CurMBB->addSuccessor(DefaultMBB);
return;
}