Skip to content

Commit d51bc83

Browse files
committed
[VPlan] Only skip live-ins with constants in materializeBroadccast (NFC)
Currently this should be NFC, but will be needed in future patches.
1 parent 592a3ba commit d51bc83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,8 +2203,8 @@ void VPlanTransforms::materializeBroadcasts(VPlan &Plan) {
22032203
for (VPValue *VPV : VPValues) {
22042204
if (all_of(VPV->users(),
22052205
[VPV](VPUser *U) { return U->usesScalars(VPV); }) ||
2206-
(VPV->isLiveIn() &&
2207-
(!VPV->getLiveInIRValue() || isa<Constant>(VPV->getLiveInIRValue()))))
2206+
(VPV->isLiveIn() && VPV->getLiveInIRValue() &&
2207+
isa<Constant>(VPV->getLiveInIRValue())))
22082208
continue;
22092209

22102210
// Add explicit broadcast at the insert point that dominates all users.

0 commit comments

Comments
 (0)