bool TargetInstrInfoImpl::findCommutedOpIndices(MachineInstr *MI,
unsigned &SrcOpIdx1,
unsigned &SrcOpIdx2) const {
- assert(MI->getOpcode() != TargetOpcode::BUNDLE &&
+ assert(!MI->isBundle() &&
"TargetInstrInfoImpl::findCommutedOpIndices() can't handle bundles");
const MCInstrDesc &MCID = MI->getDesc();
}
+bool
+TargetInstrInfoImpl::isUnpredicatedTerminator(const MachineInstr *MI) const {
+ if (!MI->isTerminator()) return false;
+
+ // Conditional branch is a special case.
+ if (MI->isBranch() && !MI->isBarrier())
+ return true;
+ if (!MI->isPredicable())
+ return true;
+ return !isPredicated(MI);
+}
+
+
bool TargetInstrInfoImpl::PredicateInstruction(MachineInstr *MI,
const SmallVectorImpl<MachineOperand> &Pred) const {
bool MadeChange = false;
- assert(MI->getOpcode() != TargetOpcode::BUNDLE &&
+ assert(!MI->isBundle() &&
"TargetInstrInfoImpl::PredicateInstruction() can't handle bundles");
const MCInstrDesc &MCID = MI->getDesc();