[llvm] [VPlan] Add VPInstruction to unpack vector values to scalars. (PR #155670)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 10:50:59 PDT 2025


================
@@ -548,7 +563,8 @@ void VPlanTransforms::replicateByVF(VPlan &Plan, ElementCount VF) {
           (isa<VPReplicateRecipe>(&R) &&
            cast<VPReplicateRecipe>(&R)->isSingleScalar()) ||
           (isa<VPInstruction>(&R) &&
-           !cast<VPInstruction>(&R)->doesGeneratePerAllLanes()))
+           !cast<VPInstruction>(&R)->doesGeneratePerAllLanes() &&
+           cast<VPInstruction>(&R)->getOpcode() != VPInstruction::UnpackVector))
----------------
fhahn wrote:

There's unfortunately no nice way do that w/o introducing a variable only used for the if

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


More information about the llvm-commits mailing list