[llvm] [RISCV][llvm] Select splat_vector(constant) with PLI (PR #168204)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 16 22:29:52 PST 2025


================
@@ -525,7 +525,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
     setOperationAction(ISD::SSUBSAT, VTs, Legal);
     setOperationAction({ISD::AVGFLOORS, ISD::AVGFLOORU}, VTs, Legal);
     setOperationAction({ISD::ABDS, ISD::ABDU}, VTs, Legal);
-    setOperationAction(ISD::BUILD_VECTOR, VTs, Custom);
+    setOperationAction(ISD::SPLAT_VECTOR, VTs, Legal);
----------------
topperc wrote:

It means we can make it legal and add patterns to use PADD.BS, PADD.HS, PADD.WS when the operand isn't a constant.

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


More information about the llvm-commits mailing list