[llvm] [RISCV] Remove last use of @llvm.experimental.vp.splat in RISCVCodeGenPrepare. NFCI (PR #170543)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 3 21:30:24 PST 2025
================
@@ -271,8 +271,10 @@ bool RISCVCodeGenPrepare::expandVPStrideLoad(IntrinsicInst &II) {
IRBuilder<> Builder(&II);
Type *STy = VTy->getElementType();
Value *Val = Builder.CreateLoad(STy, BasePtr);
- Value *Res = Builder.CreateIntrinsic(Intrinsic::experimental_vp_splat, {VTy},
- {Val, II.getOperand(2), VL});
+ Value *Res = Builder.CreateIntrinsic(
+ Intrinsic::vp_merge, VTy,
----------------
lukel97 wrote:
I guess it's also legal to combine the vp_splat to just a regular splat, although that's a combine not a simplification.
My main motivation for this is that I think at the time experimental.vp.splat was added, we were still going in the direction of emitting VP intrinsics for most things in the loop vectorizer etc. But now that we don't plan on emitting them anymore in the loop vectorizer, having an entire intrinsic for this one expansion seems overkill.
We could avoid the vp_merge and emit a vmv.v.x directly by moving this expansion into RISCVISelLowering like in https://github.com/llvm/llvm-project/pull/97798. But we might not have enough information about whether or not the AVL is non-zero there.
https://github.com/llvm/llvm-project/pull/170543
More information about the llvm-commits
mailing list