[llvm] [RISCV] Use QC_E_LI to materialise addresses (PR #155819)

Sudharsan Veeravalli via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 18:20:35 PDT 2025


================
@@ -1605,6 +1607,13 @@ def : Pat<(qc_setwmi GPR:$rs3, GPR:$rs1, tuimm5nonzero:$uimm5, tuimm7_lsb00:$uim
           (QC_SETWMI GPR:$rs3, GPR:$rs1, tuimm5nonzero:$uimm5, tuimm7_lsb00:$uimm7)>;
 } // Predicates = [HasVendorXqcilsm, IsRV32]
 
+let Predicates = [HasVendorXqcili, IsRV32] in {
+def: Pat<(qc_e_li tglobaladdr:$A),   (QC_E_LI bare_simm32:$A)>;
----------------
svs-quic wrote:

I had copy pasted from elsewhere and modified the patterns. Fixed the spaces now.

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


More information about the llvm-commits mailing list