aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2005-12-20 00:06:17 +0000
committerEvan Cheng <evan.cheng@apple.com>2005-12-20 00:06:17 +0000
commite08705134f133bd9c9f0c3976174b692a912f69e (patch)
tree39dacbe4d8a5653b12ff75b87575f571c699ee77 /utils/TableGen
parent88276b887c426cf5d998b705a14663bfa38f8efd (diff)
downloadexternal_llvm-e08705134f133bd9c9f0c3976174b692a912f69e.zip
external_llvm-e08705134f133bd9c9f0c3976174b692a912f69e.tar.gz
external_llvm-e08705134f133bd9c9f0c3976174b692a912f69e.tar.bz2
Lefted out a fix in the previous check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index e14ab6d..155dfad 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -2134,7 +2134,13 @@ public:
}
}
- OS << " return Result.getValue(N.ResNo);\n";
+ // FIXME: this only works because (for now) an instruction can either
+ // produce a single result or a single flag.
+ if (II.hasCtrlDep && NumImpResults > 0)
+ OS << " return (N.ResNo) ? Chain : Result.getValue(1);"
+ << " // Chain comes before flag.\n";
+ else
+ OS << " return Result.getValue(N.ResNo);\n";
} else {
// If this instruction is the root, and if there is only one use of it,
// use SelectNodeTo instead of getTargetNode to avoid an allocation.