diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-07-08 06:01:49 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-07-08 06:01:49 +0000 |
commit | 4ff7ab612c66fb7ecf547242d6906be6ec3fa604 (patch) | |
tree | 08dd48c251c6f1df9626f77589187eefbb0c1b08 /lib/Target/ARM | |
parent | 3651d92d91062ea4b1ee8b2a88eca03bd39e1968 (diff) | |
download | external_llvm-4ff7ab612c66fb7ecf547242d6906be6ec3fa604.zip external_llvm-4ff7ab612c66fb7ecf547242d6906be6ec3fa604.tar.gz external_llvm-4ff7ab612c66fb7ecf547242d6906be6ec3fa604.tar.bz2 |
r107852 is only safe with -enable-unsafe-fp-math to account for +0.0 == -0.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index e3db583..8ca69cd 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -2295,11 +2295,13 @@ SDValue ARMTargetLowering::getVFPCmp(SDValue &LHS, SDValue &RHS, ISD::CondCode CC, SDValue &ARMCC, SelectionDAG &DAG, DebugLoc dl) const { - if ((CC == ISD::SETEQ || CC == ISD::SETOEQ || + if (UnsafeFPMath && + (CC == ISD::SETEQ || CC == ISD::SETOEQ || CC == ISD::SETNE || CC == ISD::SETUNE) && canBitcastToInt(LHS.getNode()) && canBitcastToInt(RHS.getNode())) { - // If there are no othter uses of the CMP operands, and the condition - // code is EQ oe NE, we can optimize it to an integer comparison. + // If unsafe fp math optimization is enabled and there are no othter uses of + // the CMP operands, and the condition code is EQ oe NE, we can optimize it + // to an integer comparison. if (CC == ISD::SETOEQ) CC = ISD::SETEQ; else if (CC == ISD::SETUNE) |