X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTarget%2FPowerPC%2FPPCInstrInfo.cpp;h=daf8790fefcc5988e1c7d879f1f5bcf78af78beb;hp=ff2633eac3f874e2bfafcb3e84eb5a0519f33f82;hb=41454cc88bfbf16ae4aa89d4398ac034d98e7883;hpb=00e0b8a01652bcd3bcfaa817d3ff5cb230cb68f6;ds=sidebyside diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp index ff2633eac3f..daf8790fefc 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -1754,6 +1754,12 @@ protected: unsigned OldFMAReg = MI->getOperand(0).getReg(); + // The transformation doesn't work well with things like: + // %vreg5 = A-form-op %vreg5, %vreg11, %vreg5; + // so leave such things alone. + if (OldFMAReg == KilledProdReg) + continue; + assert(OldFMAReg == AddendMI->getOperand(0).getReg() && "Addend copy not tied to old FMA output!");