[llvm] [RISCV] add more generic macrofusions (PR #151140)
Daniel Henrique Barboza via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 29 09:46:51 PDT 2025
================
@@ -91,3 +91,94 @@ def TuneLDADDFusion
CheckIsImmOperand<2>,
CheckImmOperand<2, 0>
]>>;
+
+// Fuse add with lw:
+// add rd, rs1, rs2
+// lw rd, 0(rd)
----------------
danielhb wrote:
Oh, I believe I forgot add+lh/add+lb because they barely appear in the benchmarks I've run. The bulk of fusions are add+ld and add+lw and LLVM already has add+ld.
I'll add add+lh and add+lb to complete the add + load macrofusion support. Should I add an aggregate add+ld/lw/lh/lb macrofusion like I did with shNadd?
https://github.com/llvm/llvm-project/pull/151140
More information about the llvm-commits
mailing list