diff options
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index ed2eda8..1ce735c 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -4333,13 +4333,24 @@ void CodeGenDAGPatterns::ParseOnePattern(Record *TheDef, // that register class does not accept that type, the type inference // will lead to a contradiction, which is not an error however, but // a sign that this pattern will simply never match. - if (Temp.getOnlyTree()->hasPossibleType()) - for (const auto &T : Pattern.getTrees()) + if (Temp.getOnlyTree()->hasPossibleType()) { + for (const auto &T : Pattern.getTrees()) { if (T->hasPossibleType()) AddPatternToMatch(&Pattern, PatternToMatch(TheDef, Preds, T, Temp.getOnlyTree(), InstImpResults, Complexity, TheDef->getID())); + } + } else { + // Show a message about a dropped pattern with some info to make it + // easier to identify it in the .td files. + LLVM_DEBUG({ + dbgs() << "Dropping: "; + Pattern.dump(); + Temp.getOnlyTree()->dump(); + dbgs() << "\n"; + }); + } } void CodeGenDAGPatterns::ParsePatterns() { |