Home | History | Annotate | Download | only in SystemZ

Lines Matching full:branch

158     // A terminator that isn't a branch can't easily be handled by this
164 SystemZII::Branch Branch(getBranchInfo(I));
165 if (!Branch.Target->isMBB())
169 if (Branch.Type != SystemZII::BranchNormal)
172 if (Branch.CCMask == SystemZ::CCMASK_ANY) {
175 TBB = Branch.Target->getMBB();
187 if (MBB.isLayoutSuccessor(Branch.Target->getMBB())) {
195 TBB = Branch.Target->getMBB();
199 // Working from the bottom, handle the first conditional branch.
201 // FIXME: add X86-style branch swap
203 TBB = Branch.Target->getMBB();
204 Cond.push_back(MachineOperand::CreateImm(Branch.CCValid));
205 Cond.push_back(MachineOperand::CreateImm(Branch.CCMask));
210 assert(Cond.size() == 2 && TBB && "Should have seen a conditional branch");
212 // Only handle the case where all conditional branches branch to the same
214 if (TBB != Branch.Target->getMBB())
220 if (OldCCValid == Branch.CCValid && OldCCMask == Branch.CCMask)
243 // Remove the branch.
271 "SystemZ branch conditions have one component!");
274 // Unconditional branch?
275 assert(!FBB && "Unconditional branch with multiple successors!");
280 // Conditional branch.
289 // Two-way Conditional branch. Insert the second branch.
672 SystemZII::Branch
678 return SystemZII::Branch(SystemZII::BranchNormal, SystemZ::CCMASK_ANY,
683 return SystemZII::Branch(SystemZII::BranchNormal,
688 return SystemZII::Branch(SystemZII::BranchCT, SystemZ::CCMASK_ICMP,
692 return SystemZII::Branch(SystemZII::BranchCTG, SystemZ::CCMASK_ICMP,
697 return SystemZII::Branch(SystemZII::BranchC, SystemZ::CCMASK_ICMP,
702 return SystemZII::Branch(SystemZII::BranchCG, SystemZ::CCMASK_ICMP,
706 llvm_unreachable("Unrecognized branch opcode");