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) {
295
295
if (hasVectorValue (Def))
296
296
return Data.VPV2Vector [Def];
297
297
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) {
304
299
if (VF.isScalar ())
305
300
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.
316
301
// Broadcast the scalar into all locations in the vector.
317
302
Value *Shuf = Builder.CreateVectorSplat (VF, V, " broadcast" );
318
-
319
303
return Shuf;
320
304
};
321
305
You can’t perform that action at this time.
0 commit comments