-enable-unsafe-fp-math should not imply -enable-finite-only-fp-math.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 13 Jul 2010 18:46:14 +0000 (18:46 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 13 Jul 2010 18:46:14 +0000 (18:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108254 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/TargetMachine.cpp
test/CodeGen/X86/2006-05-22-FPSetEQ.ll
test/CodeGen/X86/fabs.ll
test/CodeGen/X86/sse-minmax.ll

index df523688c583b61988ce861b3074792a67a7a9be..47c91df1400e664013a76a906f92b9a861d4077d 100644 (file)
@@ -294,7 +294,7 @@ namespace llvm {
   /// option is specified on the command line. If this returns false (default),
   /// the code generator is not allowed to assume that FP arithmetic arguments
   /// and results are never NaNs or +-Infs.
-  bool FiniteOnlyFPMath() { return UnsafeFPMath || FiniteOnlyFPMathOption; }
+  bool FiniteOnlyFPMath() { return FiniteOnlyFPMathOption; }
   
   /// HonorSignDependentRoundingFPMath - Return true if the codegen must assume
   /// that the rounding mode of the FPU can change from its default.
index 083d06805f2f6e4e5212486957bca70c5aead07d..2d7bd27d24bdcbada210e6315f75d1b2a6552301 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llc < %s -march=x86 | grep setnp
-; RUN: llc < %s -march=x86 -enable-unsafe-fp-math | \
+; RUN: llc < %s -march=x86 -enable-unsafe-fp-math -enable-finite-only-fp-math | \
 ; RUN:   not grep setnp
 
 define i32 @test(float %f) {
index 54947c394b5e86b7f3df60d43db1133cafaceb85..23b45ebb8d8b4ea4dfc7195f705b97ac56697ca5 100644 (file)
@@ -1,7 +1,7 @@
 ; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
 ; RUN: llc < %s -march=x86 -mattr=-sse2,-sse3,-sse | grep fabs\$ | \
 ; RUN:   count 2
-; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
+; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math -enable-finite-only-fp-math | \
 ; RUN:   grep fabs\$ | count 3
 
 declare float @fabsf(float)
index d265bd7366d4dcf11961d2e5065112be0f4e4f6c..ebcdc655eedaa21104b94dea7aac2b23d9a1e3ae 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s
-; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-unsafe-fp-math | FileCheck -check-prefix=UNSAFE %s
+; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-unsafe-fp-math -enable-finite-only-fp-math | FileCheck -check-prefix=UNSAFE %s
 ; RUN: llc < %s -march=x86-64 -asm-verbose=false -enable-finite-only-fp-math | FileCheck -check-prefix=FINITE %s
 
 ; Some of these patterns can be matched as SSE min or max. Some of