Pull in r163967 from upstream llvm trunk:
X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe fp math. This should make clang emit calls to libm for sinf/cosf by default. MFC after: 1 week
This commit is contained in:
parent
4e376ee7fa
commit
0d3f939ba7
@ -643,7 +643,9 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f32, Expand);
|
||||
|
||||
if (!TM.Options.UnsafeFPMath) {
|
||||
setOperationAction(ISD::FSIN , MVT::f32 , Expand);
|
||||
setOperationAction(ISD::FSIN , MVT::f64 , Expand);
|
||||
setOperationAction(ISD::FCOS , MVT::f32 , Expand);
|
||||
setOperationAction(ISD::FCOS , MVT::f64 , Expand);
|
||||
}
|
||||
addLegalFPImmediate(APFloat(+0.0)); // FLD0
|
||||
|
Loading…
x
Reference in New Issue
Block a user