Check for FiniteOnlyFPMath as well.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 8 Jul 2010 20:12:24 +0000 (20:12 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 8 Jul 2010 20:12:24 +0000 (20:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107904 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/fpcmp-opt.ll

index 8ca69cd6122a6fea0b817ccb13fb756e7a38805a..e1e5a80678b40ea10cc1784b9aeab3c8a4362892 100644 (file)
@@ -2295,7 +2295,7 @@ SDValue
 ARMTargetLowering::getVFPCmp(SDValue &LHS, SDValue &RHS, ISD::CondCode CC,
                              SDValue &ARMCC, SelectionDAG &DAG,
                              DebugLoc dl) const {
-  if (UnsafeFPMath &&
+  if (UnsafeFPMath && FiniteOnlyFPMath() &&
       (CC == ISD::SETEQ || CC == ISD::SETOEQ ||
        CC == ISD::SETNE || CC == ISD::SETUNE) &&
       canBitcastToInt(LHS.getNode()) && canBitcastToInt(RHS.getNode())) {
index f651c167cc71d2431745a976edf4577272d89f33..8016033b1fb40640d2d5b2357b0fbfe1d80199bb 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm -mattr=+vfp2 -enable-unsafe-fp-math | FileCheck %s
+; RUN: llc < %s -march=arm -mattr=+vfp2 -enable-unsafe-fp-math -enable-finite-only-fp-math | FileCheck %s
 ; rdar://7461510
 
 define arm_apcscc i32 @t1(float* %a, float* %b) nounwind {