From c21c8b33112e3d28619c40b78b4c166eff21de22 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 28 May 2009 04:31:08 +0000 Subject: [PATCH] Return the operand rather than a null SDValue when the given SELECT_CC is actually legal. Part of LegalizeDAG cleanups. llvm-svn: 72513 --- lib/Target/PowerPC/PPCISelLowering.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index 5643b993198..a7744b8f7a4 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -2789,12 +2789,12 @@ SDValue PPCTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) { // Not FP? Not a fsel. if (!Op.getOperand(0).getValueType().isFloatingPoint() || !Op.getOperand(2).getValueType().isFloatingPoint()) - return SDValue(); + return Op; ISD::CondCode CC = cast(Op.getOperand(4))->get(); // Cannot handle SETEQ/SETNE. - if (CC == ISD::SETEQ || CC == ISD::SETNE) return SDValue(); + if (CC == ISD::SETEQ || CC == ISD::SETNE) return Op; MVT ResVT = Op.getValueType(); MVT CmpVT = Op.getOperand(0).getValueType(); @@ -2854,7 +2854,7 @@ SDValue PPCTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) { Cmp = DAG.getNode(ISD::FP_EXTEND, dl, MVT::f64, Cmp); return DAG.getNode(PPCISD::FSEL, dl, ResVT, Cmp, TV, FV); } - return SDValue(); + return Op; } // FIXME: Split this code up when LegalizeDAGTypes lands.