summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-18 02:59:52 +0000
committerChris Lattner <sabre@nondot.org>2005-01-18 02:59:52 +0000
commit2cb338d7b5932ad3126578090ef676b5d01adc7d (patch)
treeaf2519865f691b29733425089dd46ec0a253e53a /llvm/lib
parentb07e2d2084d3ce53de68a7912fdf9cb1c8c58a7f (diff)
downloadbcm5719-llvm-2cb338d7b5932ad3126578090ef676b5d01adc7d.tar.gz
bcm5719-llvm-2cb338d7b5932ad3126578090ef676b5d01adc7d.zip
Teach legalize to promote SetCC results.
llvm-svn: 19657
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index b975e5859ec..46db8580533 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -917,6 +917,14 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
Result = DAG.getNode(ISD::FP_EXTEND, NVT, Op);
assert(isa<ConstantFPSDNode>(Result) && "Didn't constant fold fp_extend?");
break;
+ case ISD::SETCC:
+ assert(getTypeAction(TLI.getSetCCResultTy()) == Legal &&
+ "SetCC type is not legal??");
+ Result = DAG.getSetCC(cast<SetCCSDNode>(Node)->getCondition(),
+ TLI.getSetCCResultTy(), Node->getOperand(0),
+ Node->getOperand(1));
+ Result = LegalizeOp(Result);
+ break;
case ISD::TRUNCATE:
switch (getTypeAction(Node->getOperand(0).getValueType())) {
OpenPOWER on IntegriCloud