[llvm-commits] [llvm] r56136 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Dale Johannesen
dalej at apple.com
Thu Sep 11 17:30:57 PDT 2008
Author: johannes
Date: Thu Sep 11 19:30:56 2008
New Revision: 56136
URL: http://llvm.org/viewvc/llvm-project?rev=56136&view=rev
Log:
The sequence for ppcf128 compares was not IEEE
safe in the presence of NaNs.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=56136&r1=56135&r2=56136&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Sep 11 19:30:56 2008
@@ -4763,14 +4763,16 @@
if (VT==MVT::ppcf128) {
// FIXME: This generated code sucks. We want to generate
- // FCMP crN, hi1, hi2
+ // FCMPU crN, hi1, hi2
// BNE crN, L:
- // FCMP crN, lo1, lo2
+ // FCMPU crN, lo1, lo2
// The following can be improved, but not that much.
- Tmp1 = DAG.getSetCC(TLI.getSetCCResultType(LHSHi), LHSHi, RHSHi, ISD::SETEQ);
+ Tmp1 = DAG.getSetCC(TLI.getSetCCResultType(LHSHi), LHSHi, RHSHi,
+ ISD::SETOEQ);
Tmp2 = DAG.getSetCC(TLI.getSetCCResultType(LHSLo), LHSLo, RHSLo, CCCode);
Tmp3 = DAG.getNode(ISD::AND, Tmp1.getValueType(), Tmp1, Tmp2);
- Tmp1 = DAG.getSetCC(TLI.getSetCCResultType(LHSHi), LHSHi, RHSHi, ISD::SETNE);
+ Tmp1 = DAG.getSetCC(TLI.getSetCCResultType(LHSHi), LHSHi, RHSHi,
+ ISD::SETUNE);
Tmp2 = DAG.getSetCC(TLI.getSetCCResultType(LHSHi), LHSHi, RHSHi, CCCode);
Tmp1 = DAG.getNode(ISD::AND, Tmp1.getValueType(), Tmp1, Tmp2);
Tmp1 = DAG.getNode(ISD::OR, Tmp1.getValueType(), Tmp1, Tmp3);
More information about the llvm-commits
mailing list