summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorMikael Holmen <mikael.holmen@ericsson.com>2017-05-10 13:06:13 +0000
committerMikael Holmen <mikael.holmen@ericsson.com>2017-05-10 13:06:13 +0000
commit21c867c26e11d414a65a7158502945bac307e033 (patch)
tree47f6173914fe194f0d981d0cb64a208412d46b95 /llvm/lib/CodeGen/IfConversion.cpp
parent11d251c05cc498194945cac07ab5d17770e298bf (diff)
downloadbcm5719-llvm-21c867c26e11d414a65a7158502945bac307e033.tar.gz
bcm5719-llvm-21c867c26e11d414a65a7158502945bac307e033.zip
[IfConversion] Add missing check in IfConversion/canFallThroughTo
Summary: When trying to figure out if MBB could fallthrough to ToMBB (possibly by falling through a bunch of other MBBs) we didn't actually check if there was fallthrough between the last two blocks in the chain. Reviewers: kparzysz, iteratee, MatzeB Reviewed By: kparzysz, iteratee Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D32996 llvm-svn: 302650
Diffstat (limited to 'llvm/lib/CodeGen/IfConversion.cpp')
-rw-r--r--llvm/lib/CodeGen/IfConversion.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index 37fe4158233..46c3911b9d6 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -1318,7 +1318,8 @@ static bool canFallThroughTo(MachineBasicBlock &MBB, MachineBasicBlock &ToMBB) {
return false;
PI = I++;
}
- return true;
+ // Finally see if the last I is indeed a successor to PI.
+ return PI->isSuccessor(&*I);
}
/// Invalidate predecessor BB info so it would be re-analyzed to determine if it
OpenPOWER on IntegriCloud