[llvm] [TableGen] New tblgen Pattern bit to disable DAG pattern imports during GISel (PR #88382)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 08:30:58 PDT 2024


================
@@ -4378,7 +4378,8 @@ void CodeGenDAGPatterns::ParsePatterns() {
       FindPatternInputsAndOutputs(Pattern, Pattern.getTree(j), InstInputs,
                                   InstResults, InstImpResults);
 
-    ParseOnePattern(CurPattern, Pattern, Result, InstImpResults);
+    if (!CurPattern->getValueAsBit("GISelShouldIgnore"))
----------------
Pierre-vh wrote:

Wait, wouldn't that affect the DAGISel as well?
Can you add a DAGISel test to show that a GISelShouldIgnore pattern is still processed by the DAG and emitted?
Just take a basic test that checks the OPC_ opcodes emitted and add a run line with the GISelShouldIgnore bit enabled.

https://github.com/llvm/llvm-project/pull/88382


More information about the llvm-commits mailing list