[llvm] [VPlan] Improve code in (Call|Intrinsic)::execute (NFC) (PR #203092)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 02:26:58 PDT 2026
================
@@ -2042,20 +2042,9 @@ void VPWidenCallRecipe::execute(VPTransformState &State) {
assert(State.VF.isVector() && "not widening");
assert(Variant != nullptr && "Can't create vector function.");
- FunctionType *VFTy = Variant->getFunctionType();
- // Add return type if intrinsic is overloaded on it.
SmallVector<Value *, 4> Args;
- for (const auto &I : enumerate(args())) {
- Value *Arg;
- // Some vectorized function variants may also take a scalar argument,
- // e.g. linear parameters for pointers. This needs to be the scalar value
- // from the start of the respective part when interleaving.
- if (!VFTy->getParamType(I.index())->isVectorTy())
- Arg = State.get(I.value(), VPLane(0));
- else
- Arg = State.get(I.value(), usesFirstLaneOnly(I.value()));
- Args.push_back(Arg);
- }
+ for (VPValue *Op : args())
+ Args.push_back(State.get(Op, usesFirstLaneOnly(Op)));
----------------
artagnon wrote:
Wow, I was incredibly sloppy and totally missed the all_of :( On the bright side, we now have more test coverage.
https://github.com/llvm/llvm-project/pull/203092
More information about the llvm-commits
mailing list