[llvm] [VPlan] Introduce explicit broadcasts for live-ins. (PR #124644)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 15:15:30 PST 2025


================
@@ -2151,3 +2151,36 @@ void VPlanTransforms::handleUncountableEarlyExit(
   Builder.createNaryOp(VPInstruction::BranchOnCond, AnyExitTaken);
   LatchExitingBranch->eraseFromParent();
 }
+
+void VPlanTransforms::materializeLiveInBroadcasts(VPlan &Plan) {
+  VPDominatorTree VPDT;
+  VPDT.recalculate(Plan);
+  auto *VectorPreheader = Plan.getVectorPreheader();
+  VPBuilder Builder(VectorPreheader);
+  if (Plan.hasScalarVFOnly())
+    return;
----------------
ayalz wrote:

nit: early exit earlier.

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


More information about the llvm-commits mailing list