diff options
author | dim <dim@FreeBSD.org> | 2012-09-15 17:02:05 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-09-15 17:02:05 +0000 |
commit | 0d3f939ba7956c3583a7488cc9a0a85f96556ff6 (patch) | |
tree | 91d07089405cfd311eb799f4e8636cad3869ef7c /contrib/llvm/lib/Target/X86 | |
parent | 4e376ee7fabe35a4e358b10ee097702e0c9c4d0e (diff) | |
download | FreeBSD-src-0d3f939ba7956c3583a7488cc9a0a85f96556ff6.zip FreeBSD-src-0d3f939ba7956c3583a7488cc9a0a85f96556ff6.tar.gz |
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
Diffstat (limited to 'contrib/llvm/lib/Target/X86')
-rw-r--r-- | contrib/llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp b/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp index c77355f..4af12e4 100644 --- a/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -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 |