[llvm] [VPlan] Fix broadcasted values using loop region during execution (PR #142594)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 11 06:26:51 PDT 2025


================
@@ -290,18 +290,22 @@ Value *VPTransformState::get(const VPValue *Def, bool NeedsScalar) {
     return Data.VPV2Vector[Def];
 
   auto GetBroadcastInstrs = [this, Def](Value *V) {
+    VPBasicBlock *PreheaderVPBB = nullptr;
+    if (auto *Header = vputils::getFirstLoopHeader(*Plan, VPDT))
----------------
lukel97 wrote:

At this stage during execution the regions will have been dissolved, except for replicator regions. But there's a check for R->isReplicator(), so I think `VPBlockUtils::isHeader` should only return true if there's 2 predecessors

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


More information about the llvm-commits mailing list