From 160be0ffdab141fd309344edfdc486db77154ef9 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Fri, 7 Nov 2008 22:54:33 +0000 Subject: Make FP tests requiring two compares work on PPC (PR 642). This is Chris' patch from the PR, modified to realize that SETUGT/SETULT occur legitimately with integers, plus two fixes in LegalizeDAG to pass a valid result type into LegalizeSetCC. The argument of TLI.getSetCCResultType is ignored on PPC, but I think I'm following usage elsewhere. llvm-svn: 58871 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index c17ef9cedcb..84c6fb82f72 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2008,7 +2008,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { Tmp3 = Node->getOperand(3); // RHS Tmp4 = Node->getOperand(1); // CC - LegalizeSetCC(Node->getValueType(0), Tmp2, Tmp3, Tmp4); + LegalizeSetCC(TLI.getSetCCResultType(Tmp2), Tmp2, Tmp3, Tmp4); LastCALLSEQ_END = DAG.getEntryNode(); // If we didn't get both a LHS and RHS back from LegalizeSetCC, @@ -2910,7 +2910,7 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { Tmp4 = LegalizeOp(Node->getOperand(3)); // False SDValue CC = Node->getOperand(4); - LegalizeSetCC(Node->getValueType(0), Tmp1, Tmp2, CC); + LegalizeSetCC(TLI.getSetCCResultType(Tmp1), Tmp1, Tmp2, CC); // If we didn't get both a LHS and RHS back from LegalizeSetCC, // the LHS is a legal SETCC itself. In this case, we need to compare -- cgit v1.2.3