Mark ISD::FMA as Legal instead of custom for x86 with FMA3/FMA4. Needed so that llvm.muladd can be converted to ISD::FMA for fp_contract.

llvm-svn: 168413
This commit is contained in:
Craig Topper 2012-11-21 05:36:24 +00:00
parent 6dcddfb852
commit c8c28d1ff0
1 changed files with 6 additions and 6 deletions

View File

@ -1124,12 +1124,12 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
setOperationAction(ISD::VSELECT, MVT::v8f32, Legal);
if (Subtarget->hasFMA() || Subtarget->hasFMA4()) {
setOperationAction(ISD::FMA, MVT::v8f32, Custom);
setOperationAction(ISD::FMA, MVT::v4f64, Custom);
setOperationAction(ISD::FMA, MVT::v4f32, Custom);
setOperationAction(ISD::FMA, MVT::v2f64, Custom);
setOperationAction(ISD::FMA, MVT::f32, Custom);
setOperationAction(ISD::FMA, MVT::f64, Custom);
setOperationAction(ISD::FMA, MVT::v8f32, Legal);
setOperationAction(ISD::FMA, MVT::v4f64, Legal);
setOperationAction(ISD::FMA, MVT::v4f32, Legal);
setOperationAction(ISD::FMA, MVT::v2f64, Legal);
setOperationAction(ISD::FMA, MVT::f32, Legal);
setOperationAction(ISD::FMA, MVT::f64, Legal);
}
if (Subtarget->hasAVX2()) {