Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.211 -> 1.212 --- Log message: The first patch of X86 support for read cycle counter --- Diffs of the changes: (+12 -0) LegalizeDAG.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.211 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.212 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.211 Fri Nov 18 23:51:46 2005 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sun Nov 20 15:32:07 2005 @@ -1168,6 +1168,7 @@ if (Tmp1 != Node->getOperand(0)) Result = DAG.getNode(ISD::READCYCLECOUNTER, MVT::i64, Tmp1); break; + case ISD::TRUNCSTORE: Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. Tmp3 = LegalizeOp(Node->getOperand(2)); // Legalize the pointer. @@ -3336,6 +3337,17 @@ Hi = DAG.getConstant(0, NVT); break; } + + case ISD::READCYCLECOUNTER: + if (TLI.getOperationAction(ISD::READCYCLECOUNTER, VT) == TargetLowering::Custom) { + SDOperand Chain = LegalizeOp(Node->getOperand(0)); + AddLegalizedOperand(SDOperand(Node, 1), Chain); + SDOperand t = TLI.LowerOperation(Op, DAG); + ExpandOp(t, Lo, Hi); + } else + assert(0 && "Must custom expand ReadCycleCounter"); + break; + // These operators cannot be expanded directly, emit them as calls to // library functions. case ISD::FP_TO_SINT: _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits