aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/DAGISelMatcherGen.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-27 20:09:24 +0000
committerChris Lattner <sabre@nondot.org>2010-03-27 20:09:24 +0000
commit9414ae52911f1d62cabd5108e0381b9d17476157 (patch)
treeef1ee4201f255ad3d1da814bf9f745423c57de8e /utils/TableGen/DAGISelMatcherGen.cpp
parent0be6fe71390c50b211beb70e6c50e5fae060f746 (diff)
downloadexternal_llvm-9414ae52911f1d62cabd5108e0381b9d17476157.zip
external_llvm-9414ae52911f1d62cabd5108e0381b9d17476157.tar.gz
external_llvm-9414ae52911f1d62cabd5108e0381b9d17476157.tar.bz2
hoist some funky logic into CodeGenInstruction
from two places in CodeGenDAGPatterns.cpp, and use it in DAGISelMatcherGen.cpp instead of using an incorrect predicate that happened to get lucky on our current targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcherGen.cpp')
-rw-r--r--utils/TableGen/DAGISelMatcherGen.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp
index f7fd493..f0f8706 100644
--- a/utils/TableGen/DAGISelMatcherGen.cpp
+++ b/utils/TableGen/DAGISelMatcherGen.cpp
@@ -733,8 +733,7 @@ EmitResultInstructionAsOperand(const TreePatternNode *N,
// If the root came from an implicit def in the instruction handling stuff,
// don't re-add it.
Record *HandledReg = 0;
- if (N->getNumTypes() != 0 &&
- !II.ImplicitDefs.empty())
+ if (II.HasOneImplicitDefWithKnownVT(CGT) != MVT::Other)
HandledReg = II.ImplicitDefs[0];
for (unsigned i = 0; i != Pattern.getDstRegs().size(); ++i) {