Initial support for multi-result patterns:
1.
[(set GR32:$dst, (add GR32:$src1, GR32:$src2)),
 (modify EFLAGS)]
This indicates the source pattern expects the instruction would produce 2 values. The first is the result of the addition. The second is an implicit definition in register EFLAGS.
2.
def : Pat<(parallel (addc GR32:$src1, GR32:$src2), (modify EFLAGS)), ()>
Similar to #1 except this is used for def : Pat patterns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41897 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelEmitter.h b/utils/TableGen/DAGISelEmitter.h
index 7511c4e..a3b9010 100644
--- a/utils/TableGen/DAGISelEmitter.h
+++ b/utils/TableGen/DAGISelEmitter.h
@@ -371,6 +371,7 @@
     unsigned getNumOperands() const { return Operands.size(); }
     unsigned getNumImpResults() const { return ImpResults.size(); }
     unsigned getNumImpOperands() const { return ImpOperands.size(); }
+    const std::vector<Record*>& getImpResults() const { return ImpResults; }
     
     void setResultPattern(TreePatternNode *R) { ResultPattern = R; }
     
@@ -402,18 +403,21 @@
 struct PatternToMatch {
   PatternToMatch(ListInit *preds,
                  TreePatternNode *src, TreePatternNode *dst,
+                 const std::vector<Record*> &dstregs,
                  unsigned complexity):
-    Predicates(preds), SrcPattern(src), DstPattern(dst),
+    Predicates(preds), SrcPattern(src), DstPattern(dst), Dstregs(dstregs),
     AddedComplexity(complexity) {};
 
   ListInit        *Predicates;  // Top level predicate conditions to match.
   TreePatternNode *SrcPattern;  // Source pattern to match.
   TreePatternNode *DstPattern;  // Resulting pattern.
+  std::vector<Record*> Dstregs; // Physical register defs being matched.
   unsigned         AddedComplexity; // Add to matching pattern complexity.
 
   ListInit        *getPredicates() const { return Predicates; }
   TreePatternNode *getSrcPattern() const { return SrcPattern; }
   TreePatternNode *getDstPattern() const { return DstPattern; }
+  const std::vector<Record*> &getDstRegs() const { return Dstregs; }
   unsigned         getAddedComplexity() const { return AddedComplexity; }
 };