[llvm] 9f9f42d - TableGen: Remove assert that pattern results match input number

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 16:13:42 PST 2019


Author: Matt Arsenault
Date: 2019-11-06T16:06:37-08:00
New Revision: 9f9f42dbc5f54bbee6785a62acc8cd7e5ed12ea5

URL: https://github.com/llvm/llvm-project/commit/9f9f42dbc5f54bbee6785a62acc8cd7e5ed12ea5
DIFF: https://github.com/llvm/llvm-project/commit/9f9f42dbc5f54bbee6785a62acc8cd7e5ed12ea5.diff

LOG: TableGen: Remove assert that pattern results match input number

AMDGPU has some atomic instructions that do not return the previous
result, and can only be selected if there are no uses. The source
pattern will only match if the use is empty, so it should be safe to
discard the result.

Added: 
    

Modified: 
    llvm/utils/TableGen/DAGISelMatcherGen.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/DAGISelMatcherGen.cpp b/llvm/utils/TableGen/DAGISelMatcherGen.cpp
index 49c09c7d195e..6a86868a9bcd 100644
--- a/llvm/utils/TableGen/DAGISelMatcherGen.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherGen.cpp
@@ -1047,7 +1047,6 @@ void MatcherGen::EmitResultCode() {
     }
   }
 
-  assert(Ops.size() >= NumSrcResults && "Didn't provide enough results");
   SmallVector<unsigned, 8> Results(Ops);
 
   // Apply result permutation.


        


More information about the llvm-commits mailing list