diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/IfConversion.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/IfConversion.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/IfConversion.cpp b/contrib/llvm-project/llvm/lib/CodeGen/IfConversion.cpp index 1a5c5d685017..37be2eabf5fe 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/IfConversion.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/IfConversion.cpp @@ -751,7 +751,7 @@ bool IfConverter::CountDuplicatedInstructions( // A pred-clobbering instruction in the shared portion prevents // if-conversion. std::vector<MachineOperand> PredDefs; - if (TII->DefinesPredicate(*TIB, PredDefs)) + if (TII->ClobbersPredicate(*TIB, PredDefs, false)) return false; // If we get all the way to the branch instructions, don't count them. if (!TIB->isBranch()) @@ -1146,7 +1146,7 @@ void IfConverter::ScanInstructions(BBInfo &BBI, // FIXME: Make use of PredDefs? e.g. ADDC, SUBC sets predicates but are // still potentially predicable. std::vector<MachineOperand> PredDefs; - if (TII->DefinesPredicate(MI, PredDefs)) + if (TII->ClobbersPredicate(MI, PredDefs, true)) BBI.ClobbersPred = true; if (!TII->isPredicable(MI)) { @@ -2264,8 +2264,7 @@ void IfConverter::MergeBlocks(BBInfo &ToBBI, BBInfo &FromBBI, bool AddEdges) { if (ToBBI.IsBrAnalyzable) ToBBI.BB->normalizeSuccProbs(); - SmallVector<MachineBasicBlock *, 4> FromSuccs(FromMBB.succ_begin(), - FromMBB.succ_end()); + SmallVector<MachineBasicBlock *, 4> FromSuccs(FromMBB.successors()); MachineBasicBlock *NBB = getNextBlock(FromMBB); MachineBasicBlock *FallThrough = FromBBI.HasFallThrough ? NBB : nullptr; // The edge probability from ToBBI.BB to FromMBB, which is only needed when |