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:
de0963d
)
Blocks that cond-br and uncond-br/fallthrough to same block should have
author
Dale Johannesen
<dalej@apple.com>
Thu, 24 May 2007 18:31:55 +0000
(18:31 +0000)
committer
Dale Johannesen
<dalej@apple.com>
Thu, 24 May 2007 18:31:55 +0000
(18:31 +0000)
only one successor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37324
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/BranchFolding.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/BranchFolding.cpp
b/lib/CodeGen/BranchFolding.cpp
index 6c632c2aee3e3e86f1d5c0d81a0f648deec0b68d..1fe2962a365ca3d8df20bbd0ed92d3dc41897404 100644
(file)
--- a/
lib/CodeGen/BranchFolding.cpp
+++ b/
lib/CodeGen/BranchFolding.cpp
@@
-672,7
+672,10
@@
static bool CorrectExtraCFGEdges(MachineBasicBlock &MBB,
MachineBasicBlock::pred_iterator SI = MBB.succ_begin();
while (SI != MBB.succ_end()) {
- if (*SI == DestA) {
+ if (*SI == DestA && DestA == DestB) {
+ DestA = DestB = 0;
+ ++SI;
+ } else if (*SI == DestA) {
DestA = 0;
++SI;
} else if (*SI == DestB) {