[llvm] [RISCV] Implement codegen for XAndesPerf lea instructions (PR #137925)
Jim Lin via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 05:58:59 PDT 2025
================
@@ -356,3 +356,28 @@ def NDS_LDGP : NDSRVInstLDGP<0b011, "nds.ldgp">;
def NDS_SDGP : NDSRVInstSDGP<0b111, "nds.sdgp">;
} // Predicates = [HasVendorXAndesPerf, IsRV64]
} // DecoderNamespace = "XAndes"
+
+// Patterns
+
+let Predicates = [HasVendorXAndesPerf] in {
+class NDS_LEAPat<int shamt, RVInstR Inst>
+ : Pat<(add (XLenVT GPR:$rs1), (shl GPR:$rs2, (XLenVT shamt))),
----------------
tclin914 wrote:
Thanks for pointing that out. I've updated the patterns for Zba to be multiclass/class so they can be reused.
https://github.com/llvm/llvm-project/pull/137925
More information about the llvm-commits
mailing list