Lines Matching full:branch
294 // A terminator that isn't a branch can't easily be handled by this
300 SystemZII::Branch Branch(getBranchInfo(*I));
301 if (!Branch.Target->isMBB())
305 if (Branch.Type != SystemZII::BranchNormal)
308 if (Branch.CCMask == SystemZ::CCMASK_ANY) {
311 TBB = Branch.Target->getMBB();
323 if (MBB.isLayoutSuccessor(Branch.Target->getMBB())) {
331 TBB = Branch.Target->getMBB();
335 // Working from the bottom, handle the first conditional branch.
337 // FIXME: add X86-style branch swap
339 TBB = Branch.Target->getMBB();
340 Cond.push_back(MachineOperand::CreateImm(Branch.CCValid));
341 Cond.push_back(MachineOperand::CreateImm(Branch.CCMask));
346 assert(Cond.size() == 2 && TBB && "Should have seen a conditional branch");
348 // Only handle the case where all conditional branches branch to the same
350 if (TBB != Branch.Target->getMBB())
356 if (OldCCValid == Branch.CCValid && OldCCMask == Branch.CCMask)
379 // Remove the branch.
407 "SystemZ branch conditions have one component!");
410 // Unconditional branch?
411 assert(!FBB && "Unconditional branch with multiple successors!");
416 // Conditional branch.
425 // Two-way Conditional branch. Insert the second branch.
560 // we'd need to emit an unconditional branch to the beginning anyway,
562 // loops (eg. compare-and-swap retry), so just decide based on branch
566 // into a Conditional Compare regardless of the branch probability.
1206 SystemZII::Branch
1212 return SystemZII::Branch(SystemZII::BranchNormal, SystemZ::CCMASK_ANY,
1217 return SystemZII::Branch(SystemZII::BranchNormal, MI.getOperand(0).getImm(),
1221 return SystemZII::Branch(SystemZII::BranchCT, SystemZ::CCMASK_ICMP,
1225 return SystemZII::Branch(SystemZII::BranchCTG, SystemZ::CCMASK_ICMP,
1230 return SystemZII::Branch(SystemZII::BranchC, SystemZ::CCMASK_ICMP,
1235 return SystemZII::Branch(SystemZII::BranchCL, SystemZ::CCMASK_ICMP,
1240 return SystemZII::Branch(SystemZII::BranchCG, SystemZ::CCMASK_ICMP,
1245 return SystemZII::Branch(SystemZII::BranchCLG, SystemZ::CCMASK_ICMP,
1249 llvm_unreachable("Unrecognized branch opcode");