Check for FiniteOnlyFPMath as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2010-07-08 20:12:24 +00:00
parent ca76f6f57c
commit 5d115a0ff9
2 changed files with 2 additions and 2 deletions

View 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())) {

View 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 {