diff options
author | Evan Cheng <evan.cheng@apple.com> | 2005-12-10 00:09:17 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2005-12-10 00:09:17 +0000 |
commit | 1129e87ff45324af19241e2106299f0a724c9f1a (patch) | |
tree | 5378386ef56f59cea4e59fa0e9870f87fcb747e5 /utils/TableGen/DAGISelEmitter.cpp | |
parent | 0976122abcea58fc9be081a431bd8390cb00c367 (diff) | |
download | external_llvm-1129e87ff45324af19241e2106299f0a724c9f1a.zip external_llvm-1129e87ff45324af19241e2106299f0a724c9f1a.tar.gz external_llvm-1129e87ff45324af19241e2106299f0a724c9f1a.tar.bz2 |
For instructions which produce no result, e.g. store, chain's Resno == 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 285c10f..3d64fa7 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -1779,10 +1779,11 @@ public: if (NodeHasChain(N, ISE)) { OpNo = 1; if (!isRoot) { + const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); OS << " if (!" << RootName << ".hasOneUse()) goto P" << PatternNo << "Fail; // Multiple uses of actual result?\n"; OS << " if (CodeGenMap.count(" << RootName - << ".getValue(1))) goto P" + << ".getValue(" << CInfo.getNumResults() << "))) goto P" << PatternNo << "Fail; // Already selected for a chain use?\n"; } if (InnerChain.empty()) { @@ -2024,10 +2025,11 @@ public: } OS << " Chain "; if (NodeHasChain(LHS, ISE)) - OS << "= CodeGenMap[N.getValue(1)] "; + OS << "= CodeGenMap[N.getValue(" << NumResults << ")] "; for (unsigned j = 0, e = FoldedChains.size(); j < e; j++) - OS << "= CodeGenMap[" << FoldedChains[j] << ".getValue(1)] "; - OS << "= Result.getValue(1);\n"; + OS << "= CodeGenMap[" << FoldedChains[j] << ".getValue(" + << NumResults << ")] "; + OS << "= Result.getValue(" << NumResults << ");\n"; if (NumResults == 0) OS << " return Chain;\n"; else |