diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-15 12:44:27 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-15 12:44:27 +0000 |
| commit | ece434252ce8d59ad740d831a4a85e357ef5dada (patch) | |
| tree | 176eac9d375d1f2c39f5be292d11e8e9b2d67978 /llvm/lib | |
| parent | 98f93adefc22c674cb0973ccb93ba77e3b5a37f4 (diff) | |
| download | bcm5719-llvm-ece434252ce8d59ad740d831a4a85e357ef5dada.tar.gz bcm5719-llvm-ece434252ce8d59ad740d831a4a85e357ef5dada.zip | |
X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe fp math.
This was only an issue if sse is disabled.
llvm-svn: 163967
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 8b624351aa5..baa83c65112 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -647,7 +647,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 |

