aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-28 04:31:08 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-28 04:31:08 +0000
commit51c4ad00f756c80aeaf55d0a77f8d40c7e5fa3aa (patch)
tree43254828282984197b266497bbf219a6b8159601 /lib/Target
parente92793590a543d241a7eba0950d379651a0c6fe8 (diff)
downloadexternal_llvm-51c4ad00f756c80aeaf55d0a77f8d40c7e5fa3aa.zip
external_llvm-51c4ad00f756c80aeaf55d0a77f8d40c7e5fa3aa.tar.gz
external_llvm-51c4ad00f756c80aeaf55d0a77f8d40c7e5fa3aa.tar.bz2
Return the operand rather than a null SDValue when the given SELECT_CC
is actually legal. Part of LegalizeDAG cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72513 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 5643b99..a7744b8 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<CondCodeSDNode>(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.