Home | History | Annotate | Download | only in SystemZ

Lines Matching refs:Branch

12 // (2) fuses compares and branches into COMPARE AND BRANCH instructions
31 STATISTIC(BranchOnCounts, "Number of branch-on-count instructions");
33 STATISTIC(FusedComparisons, "Number of fused compare-and-branch instructions");
172 // of -1 and if CCUsers is a single branch on nonzero, eliminate the addition
173 // and convert the branch to a BRCT(G). Return true on success.
192 MachineInstr *Branch = CCUsers[0];
193 if (Branch->getOpcode() != SystemZ::BRC ||
194 Branch->getOperand(0).getImm() != SystemZ::CCMASK_ICMP ||
195 Branch->getOperand(1).getImm() != SystemZ::CCMASK_CMP_NE)
200 // Compare and Branch.
202 MachineBasicBlock::iterator MBBI = Compare, MBBE = Branch;
207 // The transformation is OK. Rebuild Branch as a BRCT(G).
208 MachineOperand Target(Branch->getOperand(2));
209 while (Branch->getNumOperands())
210 Branch->RemoveOperand(0);
211 Branch->setDesc(TII->get(BRCT));
212 MachineInstrBuilder(*Branch->getParent()->getParent(), Branch)
350 // Try to remove both MI and Compare by converting a branch to BRCT(G).
374 // Try to fuse comparison instruction Compare into a later branch.
385 // See whether we have a single branch with which to fuse.
388 MachineInstr *Branch = CCUsers[0];
389 if (Branch->getOpcode() != SystemZ::BRC)
392 // Make sure that the operands are available at the branch.
396 MachineBasicBlock::iterator MBBI = Compare, MBBE = Branch;
402 // Read the branch mask and target.
411 Branch->RemoveOperand(CCUse);
412 Branch->RemoveOperand(2);
413 Branch->RemoveOperand(1);
414 Branch->RemoveOperand(0);
416 // Rebuild Branch as a fused compare and branch.
417 Branch->setDesc(TII->get(FusedOpcode));
418 MachineInstrBuilder(*Branch->getParent()->getParent(), Branch)