[llvm] [VPlan] Unroll VPReplicateRecipe by VF. (PR #142433)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 08:37:34 PDT 2025


================
@@ -261,6 +261,14 @@ Value *VPTransformState::get(const VPValue *Def, const VPLane &Lane) {
     return Data.VPV2Scalars[Def][0];
   }
 
+  // Look through BuildVector to avoid redundant extracts.
+  // TODO: Remove once replicate regions are unrolled explicitly.
+  auto *BV = dyn_cast<VPInstruction>(Def);
+  if (Lane.getKind() == VPLane::Kind::First && BV &&
+      BV->getOpcode() == VPInstruction::BuildVector) {
----------------
ayalz wrote:

Worth `match`ing?

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


More information about the llvm-commits mailing list