TableGen: Remove assert that pattern results match input number
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 29 Aug 2019 19:10:12 +0000 (15:10 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 7 Nov 2019 00:06:37 +0000 (16:06 -0800)
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.

llvm/utils/TableGen/DAGISelMatcherGen.cpp

index 49c09c7..6a86868 100644 (file)
@@ -1047,7 +1047,6 @@ void MatcherGen::EmitResultCode() {
     }
   }
 
-  assert(Ops.size() >= NumSrcResults && "Didn't provide enough results");
   SmallVector<unsigned, 8> Results(Ops);
 
   // Apply result permutation.