[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:50:17 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:
Now that I think about it, the original motivation for vp.splat was to avoid VL toggles if this expansion occurred in a loop: https://github.com/llvm/llvm-project/pull/98140#discussion_r1671314147
But I think that should be a solved problem now with RISCVVLOptimizer. So if a vp_merge gets folded to poison then it should still be fine in practice because the VL will get reduced anyway.
The vp_merge here is really only needed to preserve the test cases which return the vector instead of storing it with an EVL.
https://github.com/llvm/llvm-project/pull/170543
More information about the llvm-commits
mailing list