if (CmpInGPR == ICGPR_Sext || CmpInGPR == ICGPR_SextI32 ||
CmpInGPR == ICGPR_SextI64)
return nullptr;
+ LLVM_FALLTHROUGH;
case ISD::SIGN_EXTEND:
if (CmpInGPR == ICGPR_Zext || CmpInGPR == ICGPR_ZextI32 ||
CmpInGPR == ICGPR_ZextI64)
return std::make_pair(0U, &PPC::QSRCRegClass);
if (Subtarget.hasAltivec())
return std::make_pair(0U, &PPC::VRRCRegClass);
+ break;
case 'y': // crrc
return std::make_pair(0U, &PPC::CRRCRegClass);
}
// Eliminate all the TOC save instructions which are redundant.
Simplified |= eliminateRedundantTOCSaves(TOCSaves);
// We try to eliminate redundant compare instruction.
- //Simplified |= eliminateRedundantCompare();
+ Simplified |= eliminateRedundantCompare();
return Simplified;
}
// bge 0, .LBB0_4
bool PPCMIPeephole::eliminateRedundantCompare(void) {
+ // FIXME: this transformation is causing miscompiles. Disabling it for now
+ // until we can resolve the issue.
+ return false;
bool Simplified = false;
for (MachineBasicBlock &MBB2 : *MF) {