[llvm] [RISCV][GISEL] instruction-select vmclr (PR #110782)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 20:35:35 PDT 2024


================
@@ -50,6 +50,11 @@ def GIAddrRegImm :
   GIComplexOperandMatcher<s32, "selectAddrRegImm">,
   GIComplexPatternEquiv<AddrRegImm>;
 
+def GIVLOpS32 : GIComplexOperandMatcher<s32, "selectVLOp">,
+                GIComplexPatternEquiv<VLOp>;
+def GIVLOpS64 : GIComplexOperandMatcher<s64, "selectVLOp">,
----------------
topperc wrote:

My question is how it works in this tablegen code which can only remember one of the values.

```
  for (const Record *Equiv :                                                     
       RK.getAllDerivedDefinitions("GIComplexPatternEquiv")) {                   
    const Record *SelDAGEquiv = Equiv->getValueAsDef("SelDAGEquivalent");        
    if (!SelDAGEquiv)                                                            
      continue;                                                                  
    ComplexPatternEquivs[SelDAGEquiv] = Equiv;                                   
  }
```

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


More information about the llvm-commits mailing list