summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelEmitter.cpp
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
commitfe90b604a49ba50300d867b1c847cf02e44efe9f (patch)
tree32a00a1dcbe1b7cddaabd1efb7330ca6c2c96ee1 /llvm/utils/TableGen/DAGISelEmitter.cpp
parentc126397a69b88e765a63ef5e4266699421b77f89 (diff)
downloadbcm5719-llvm-fe90b604a49ba50300d867b1c847cf02e44efe9f.tar.gz
bcm5719-llvm-fe90b604a49ba50300d867b1c847cf02e44efe9f.zip
Lefted out a fix in the previous check in.
llvm-svn: 24873
Diffstat (limited to 'llvm/utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/DAGISelEmitter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index e14ab6d3942..155dfad3730 100644
--- a/llvm/utils/TableGen/DAGISelEmitter.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud