llvm.fmuladd.* lowering should be checking isOperationLegalOrCustom, rather than
authorLang Hames <lhames@gmail.com>
Thu, 22 Nov 2012 03:31:45 +0000 (03:31 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 22 Nov 2012 03:31:45 +0000 (03:31 +0000)
isOperationLegal. Thanks to Craig Topper for pointing this out.

llvm-svn: 168485

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index 3396d64..ae94d1e 100644 (file)
@@ -4994,7 +4994,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
   case Intrinsic::fmuladd: {
     EVT VT = TLI.getValueType(I.getType());
     if (TM.Options.AllowFPOpFusion != FPOpFusion::Strict &&
-        TLI.isOperationLegal(ISD::FMA, VT) &&
+        TLI.isOperationLegalOrCustom(ISD::FMA, VT) &&
         TLI.isFMAFasterThanMulAndAdd(VT)){
       setValue(&I, DAG.getNode(ISD::FMA, dl,
                                getValue(I.getArgOperand(0)).getValueType(),