[llvm] [RISCV] Add compress patterns for qc.extu and qc.mvltui (PR #140682)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 00:49:35 PDT 2025


================
@@ -1501,6 +1503,8 @@ def : CompressPat<(BSETI GPRC:$rs1, GPRC:$rs1, uimmlog2xlennonzero:$shamt),
                   (QC_C_BSETI GPRC:$rs1, uimmlog2xlennonzero:$shamt)>;
 def : CompressPat<(BEXTI GPRC:$rs1, GPRC:$rs1, uimmlog2xlennonzero:$shamt),
                   (QC_C_BEXTI GPRC:$rs1, uimmlog2xlennonzero:$shamt)>;
+def : CompressPat<(QC_EXTU GPRC:$rd, GPRC:$rd, 1, uimmlog2xlennonzero:$shamt),
+                  (QC_C_BEXTI GPRC:$rd, uimmlog2xlennonzero:$shamt)>;
----------------
hchandel wrote:

Done.

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


More information about the llvm-commits mailing list