From f94bc547575236d06a45bc17c576f3e19e463803 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 1 Mar 2010 22:04:33 +0000 Subject: tolerate factoring the *last* node for CellSPU. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97508 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/DAGISelMatcherOpt.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils/TableGen/DAGISelMatcherOpt.cpp') diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp index 0e89fa0..97ddf67 100644 --- a/utils/TableGen/DAGISelMatcherOpt.cpp +++ b/utils/TableGen/DAGISelMatcherOpt.cpp @@ -351,6 +351,11 @@ static void FactorNodes(OwningPtr &MatcherPtr) { return; } + if (NewOptionsToMatch.empty()) { + MatcherPtr.reset(0); + return; + } + // If our factoring failed (didn't achieve anything) see if we can simplify in // other ways. -- cgit v1.1