summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite4f71d036f7ac07f99cf1e6b32be4ffe92084454 (patch)
tree9d798c50f6a73798cd393834bdb718c154a26dc2 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent403d1c204c56f627691ee28520fb892db3e5824a (diff)
downloadbcm5719-llvm-e4f71d036f7ac07f99cf1e6b32be4ffe92084454.tar.gz
bcm5719-llvm-e4f71d036f7ac07f99cf1e6b32be4ffe92084454.zip
Fix construction of ioport intrinsics, fixing X86/io.llx and io-port.llx
llvm-svn: 22026
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 52bcc9ab75c..2e3febade9a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/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 ?
OpenPOWER on IntegriCloud