[llvm] [RISCV] GISel custom lowering for addiw (PR #121587)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 4 02:09:13 PST 2025


================
@@ -132,7 +133,14 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
 
   auto PtrVecTys = {nxv1p0, nxv2p0, nxv4p0, nxv8p0, nxv16p0};
 
-  getActionDefinitionsBuilder({G_ADD, G_SUB, G_AND, G_OR, G_XOR})
+  getActionDefinitionsBuilder({G_ADD, G_SUB})
+      .legalFor({sXLen})
+      .legalIf(typeIsLegalIntOrFPVec(0, IntOrFPVecTys, ST))
----------------
arsenm wrote:

Should this use the new legalIf form with the subtarget predicate first operand? 

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


More information about the llvm-commits mailing list