From 02f73585f7d018ea3ddcda88c8273ee4e5ea4de3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 24 Feb 2010 05:33:42 +0000 Subject: The new isel was not properly handling patterns that covered internal nodes with flag results. Record these with a new OPC_MarkFlagResults opcode and use this to update the interior nodes' flag results properly. This fixes CodeGen/X86/i256-add.ll with the new isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97021 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/DAGISelMatcherEmitter.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp') diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index c316950..ecc75c8 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -337,6 +337,15 @@ EmitMatcher(const MatcherNode *N, unsigned Indent, formatted_raw_ostream &OS) { OS << '\n'; return 6+EN->getNumVTs()+NumOperandBytes; } + case MatcherNode::MarkFlagResults: { + const MarkFlagResultsMatcherNode *CFR = cast(N); + OS << "OPC_MarkFlagResults, " << CFR->getNumNodes() << ", "; + unsigned NumOperandBytes = 0; + for (unsigned i = 0, e = CFR->getNumNodes(); i != e; ++i) + NumOperandBytes += EmitVBRValue(CFR->getNode(i), OS); + OS << '\n'; + return 2+NumOperandBytes; + } case MatcherNode::CompleteMatch: { const CompleteMatchMatcherNode *CM = cast(N); OS << "OPC_CompleteMatch, " << CM->getNumResults() << ", "; -- cgit v1.1