aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-14 13:56:55 +0000
committerChris Lattner <sabre@nondot.org>2005-05-14 13:56:55 +0000
commit1ca85d567c8860a8a7cf0730107f4ee701fa4fd0 (patch)
treef81b9f3d0df05b88b6349df37e8cbe79546e19bf /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent65af1abd1e4d93a57b28f3f81f7a4c7af851ba30 (diff)
Fix construction of ioport intrinsics, fixing X86/io.llx and io-port.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 52bcc9ab75..2e3febade9 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -711,14 +711,20 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
case Intrinsic::memmove: visitMemIntrinsic(I, ISD::MEMMOVE); return;
case Intrinsic::readport:
- case Intrinsic::readio:
+ case Intrinsic::readio: {
+ std::vector<MVT::ValueType> VTs;
+ VTs.push_back(TLI.getValueType(I.getType()));
+ VTs.push_back(MVT::Other);
+ std::vector<SDOperand> Ops;
+ Ops.push_back(getRoot());
+ Ops.push_back(getValue(I.getOperand(1)));
Tmp = DAG.getNode(F->getIntrinsicID() == Intrinsic::readport ?
- ISD::READPORT : ISD::READIO,
- TLI.getValueType(I.getType()), getRoot(),
- getValue(I.getOperand(1)));
+ ISD::READPORT : ISD::READIO, VTs, Ops);
+
setValue(&I, Tmp);
DAG.setRoot(Tmp.getValue(1));
return;
+ }
case Intrinsic::writeport:
case Intrinsic::writeio:
DAG.setRoot(DAG.getNode(F->getIntrinsicID() == Intrinsic::writeport ?