[llvm] [VPlan] Consistently use (Part, 0) for first lane scalar values (PR #80271)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 15:52:41 PST 2024
================
@@ -512,7 +518,14 @@ void VPInstruction::execute(VPTransformState &State) {
if (!hasResult())
continue;
assert(GeneratedValue && "generateInstruction must produce a value");
- State.set(this, GeneratedValue, Part);
+ if (GeneratedValue->getType()->isVectorTy())
+ State.set(this, GeneratedValue, Part);
+ else {
+ assert((getOpcode() == VPInstruction::ComputeReductionResult ||
----------------
ayalz wrote:
Ahh, right.
This in particular would be more clearly expressed by doing
`State.set(this, GeneratedValue, Part, true /* scalar */);`
rather than explicitly storing the single **last** lane directly in the **first** lane zero via
`State.set(this, GeneratedValue, VPIteration(Part, 0));`
https://github.com/llvm/llvm-project/pull/80271
More information about the llvm-commits
mailing list