From 5d115a0ff9634149ef021ec9335a47c52aaaafb0 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 8 Jul 2010 20:12:24 +0000 Subject: [PATCH] Check for FiniteOnlyFPMath as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107904 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMISelLowering.cpp | 2 +- test/CodeGen/ARM/fpcmp-opt.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 8ca69cd6122..e1e5a80678b 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/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/test/CodeGen/ARM/fpcmp-opt.ll b/test/CodeGen/ARM/fpcmp-opt.ll index f651c167cc7..8016033b1fb 100644 --- a/test/CodeGen/ARM/fpcmp-opt.ll +++ b/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 { -- 2.34.1