aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r--lib/CodeGen/IfConversion.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp
index 965cf6af19..64328d6e04 100644
--- a/lib/CodeGen/IfConversion.cpp
+++ b/lib/CodeGen/IfConversion.cpp
@@ -399,6 +399,9 @@ bool IfConverter::ValidSimple(BBInfo &TrueBBI, unsigned &Dups) const {
if (TrueBBI.IsBeingAnalyzed || TrueBBI.IsDone)
return false;
+ if (TrueBBI.IsBrAnalyzable)
+ return false;
+
if (TrueBBI.BB->pred_size() > 1) {
if (TrueBBI.CannotBeCopied ||
TrueBBI.NonPredSize > TLI->getIfCvtDupBlockSizeLimit())
@@ -406,7 +409,7 @@ bool IfConverter::ValidSimple(BBInfo &TrueBBI, unsigned &Dups) const {
Dups = TrueBBI.NonPredSize;
}
- return !blockAlwaysFallThrough(TrueBBI) && TrueBBI.BrCond.size() == 0;
+ return true;
}
/// ValidTriangle - Returns true if the 'true' and 'false' blocks (along