[llvm] [VPlan] Introduces explicit broadcast for live-in constants. (PR #133213)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 09:01:15 PDT 2025
================
@@ -3093,8 +3090,25 @@ void VPlanTransforms::materializeBroadcasts(VPlan &Plan) {
"All users must be in the vector preheader or dominated by it");
}
- VPBuilder Builder(cast<VPBasicBlock>(HoistBlock), HoistPoint);
- auto *Broadcast = Builder.createNaryOp(VPInstruction::Broadcast, {VPV});
+ VPInstruction *Broadcast;
+ if (VPV->isLiveIn() && isa_and_nonnull<Constant>(VPV->getLiveInIRValue())) {
+ // We cannot replace the constant live-ins for PHIs by broadcast in the
----------------
david-arm wrote:
I'm not sure I understand the relevance of PHIs in this code, since nothing else in this function seems to use or create them?
https://github.com/llvm/llvm-project/pull/133213
More information about the llvm-commits
mailing list