[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 13 10:00:08 PST 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.23 -> 1.24
---
Log message:

Legalize new node, add assertion.


---
Diffs of the changes:  (+16 -0)

Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.23 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.24
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.23	Wed Jan 12 12:19:52 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Thu Jan 13 11:59:25 2005
@@ -295,6 +295,18 @@
     }
     break;
   }
+  case ISD::TokenFactor: {
+    std::vector<SDOperand> Ops;
+    bool Changed = false;
+    for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) {
+      Ops.push_back(LegalizeOp(Node->getOperand(i)));  // Legalize the operands
+      Changed |= Ops[i] != Node->getOperand(i);
+    }
+    if (Changed)
+      Result = DAG.getNode(ISD::TokenFactor, MVT::Other, Ops);
+    break;
+  }
+
   case ISD::ADJCALLSTACKDOWN:
   case ISD::ADJCALLSTACKUP:
     Tmp1 = LegalizeOp(Node->getOperand(0));  // Legalize the chain.
@@ -662,6 +674,10 @@
         Result = DAG.getNode(Node->getOpcode(), Node->getValueType(0), Tmp1);
       break;
     case Expand:
+      assert(Node->getOpcode() != ISD::SINT_TO_FP &&
+             Node->getOpcode() != ISD::UINT_TO_FP &&
+             "Cannot lower Xint_to_fp to a call yet!");
+
       // In the expand case, we must be dealing with a truncate, because
       // otherwise the result would be larger than the source.
       assert(Node->getOpcode() == ISD::TRUNCATE &&






More information about the llvm-commits mailing list