[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 20 14:57:32 PST 2005
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.3 -> 1.4
---
Log message:
Lower READCYCLECOUNTER correctly, preserving the chain result
---
Diffs of the changes: (+8 -4)
X86ISelLowering.cpp | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.3 llvm/lib/Target/X86/X86ISelLowering.cpp:1.4
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.3 Sun Nov 20 16:01:40 2005
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Sun Nov 20 16:57:19 2005
@@ -920,10 +920,14 @@
std::vector<SDOperand> Ops;
Ops.push_back(Op.getOperand(0));
SDOperand rd = DAG.getNode(X86ISD::RDTSC_DAG, Tys, Ops);
- SDOperand Lo = DAG.getCopyFromReg(rd, X86::EAX, MVT::i32, rd.getValue(1));
- SDOperand Hi = DAG.getCopyFromReg(Lo.getValue(1), X86::EDX,
- MVT::i32, Lo.getValue(2));
- return DAG.getNode(ISD::BUILD_PAIR, MVT::i64, Lo, Hi);
+ Ops.clear();
+ Ops.push_back(DAG.getCopyFromReg(rd, X86::EAX, MVT::i32, rd.getValue(1)));
+ Ops.push_back(DAG.getCopyFromReg(Ops[0].getValue(1), X86::EDX,
+ MVT::i32, Ops[0].getValue(2)));
+ Ops.push_back(Ops[1].getValue(1));
+ Tys[0] = Tys[1] = MVT::i32;
+ Tys.push_back(MVT::Other);
+ return DAG.getNode(ISD::MERGE_VALUES, Tys, Ops);
}
}
}
More information about the llvm-commits
mailing list