summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-07-08 20:12:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-07-08 20:12:24 +0000
commit0f54854a1d39480d2af9f47eef2a2b59379373a3 (patch)
tree9f22c424e6740d52de9617dfb3ea19acf5a69988
parent9c160e12136a02f9ccc53982f3bf152291333084 (diff)
downloadbcm5719-llvm-0f54854a1d39480d2af9f47eef2a2b59379373a3.tar.gz
bcm5719-llvm-0f54854a1d39480d2af9f47eef2a2b59379373a3.zip
Check for FiniteOnlyFPMath as well.
llvm-svn: 107904
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp2
-rw-r--r--llvm/test/CodeGen/ARM/fpcmp-opt.ll2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 8ca69cd6122..e1e5a80678b 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -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())) {
diff --git a/llvm/test/CodeGen/ARM/fpcmp-opt.ll b/llvm/test/CodeGen/ARM/fpcmp-opt.ll
index f651c167cc7..8016033b1fb 100644
--- a/llvm/test/CodeGen/ARM/fpcmp-opt.ll
+++ b/llvm/test/CodeGen/ARM/fpcmp-opt.ll
@@ -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 {
OpenPOWER on IntegriCloud