Teach legalize to promote SetCC results.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-01-18 02:59:52 +00:00
parent f30b73b1c6
commit 82fbfb6984

View File

@ -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())) {