[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Jan 17 19:00:05 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.39 -> 1.40
---
Log message:
Teach legalize to promote SetCC results.
---
Diffs of the changes: (+8 -0)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.39 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.40
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.39 Mon Jan 17 20:52:03 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jan 17 20:59:52 2005
@@ -917,6 +917,14 @@
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())) {
More information about the llvm-commits
mailing list