File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -295,27 +295,11 @@ Value *VPTransformState::get(const VPValue *Def, bool NeedsScalar) {
295295 if (hasVectorValue (Def))
296296 return Data.VPV2Vector [Def];
297297
298- auto GetBroadcastInstrs = [this , Def](Value *V) {
299- bool SafeToHoist =
300- !Def->hasDefiningRecipe () ||
301- VPDT.properlyDominates (Def->getDefiningRecipe ()->getParent (),
302- Plan->getVectorPreheader ());
303-
298+ auto GetBroadcastInstrs = [this ](Value *V) {
304299 if (VF.isScalar ())
305300 return V;
306- // Place the code for broadcasting invariant variables in the new preheader.
307- IRBuilder<>::InsertPointGuard Guard (Builder);
308- if (SafeToHoist) {
309- BasicBlock *LoopVectorPreHeader =
310- CFG.VPBB2IRBB [Plan->getVectorPreheader ()];
311- if (LoopVectorPreHeader)
312- Builder.SetInsertPoint (LoopVectorPreHeader->getTerminator ());
313- }
314-
315- // Place the code for broadcasting invariant variables in the new preheader.
316301 // Broadcast the scalar into all locations in the vector.
317302 Value *Shuf = Builder.CreateVectorSplat (VF, V, " broadcast" );
318-
319303 return Shuf;
320304 };
321305
You can’t perform that action at this time.
0 commit comments