aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-09-23 07:18:35 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-09-23 07:18:35 +0000
commitb8db1981b8cdd7cc52a9ad94a12c73e4fb1e8b39 (patch)
tree6157940d6fb038a6ffda680a7f5057103d8a11c2 /lib/CodeGen
parentdd3a41a6b35f24d57fd3aba9043bd5321cce0cdb (diff)
downloadexternal_llvm-b8db1981b8cdd7cc52a9ad94a12c73e4fb1e8b39.zip
external_llvm-b8db1981b8cdd7cc52a9ad94a12c73e4fb1e8b39.tar.gz
external_llvm-b8db1981b8cdd7cc52a9ad94a12c73e4fb1e8b39.tar.bz2
Follow up to r114630. Do not optimize away unconditional branch following a conditional one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index f3bc50d..10095c5 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1617,9 +1617,8 @@ void SelectionDAGBuilder::visitBitTestHeader(BitTestBlock &B,
MVT::Other, CopyTo, RangeCmp,
DAG.getBasicBlock(B.Default));
- if (MBB != NextBlock)
- BrRange = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, CopyTo,
- DAG.getBasicBlock(MBB));
+ BrRange = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, CopyTo,
+ DAG.getBasicBlock(MBB));
DAG.setRoot(BrRange);
}
@@ -1672,9 +1671,8 @@ void SelectionDAGBuilder::visitBitTestCase(MachineBasicBlock* NextMBB,
if (++BBI != FuncInfo.MF->end())
NextBlock = BBI;
- if (NextMBB != NextBlock)
- BrAnd = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, BrAnd,
- DAG.getBasicBlock(NextMBB));
+ BrAnd = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, BrAnd,
+ DAG.getBasicBlock(NextMBB));
DAG.setRoot(BrAnd);
}