Skip to content

Commit 77093ba

Browse files
committed
[VPlan] Increase clarity around WidenStore condition (NFC)
1 parent 4b0b896 commit 77093ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,8 +1419,9 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
14191419
// broadcasts.
14201420
if (!vputils::isSingleScalar(RepOrWidenR) ||
14211421
!all_of(RepOrWidenR->users(), [RepOrWidenR](const VPUser *U) {
1422-
if (isa<VPWidenStoreRecipe>(U))
1423-
return true;
1422+
if (auto *Store = dyn_cast<VPWidenStoreRecipe>(U))
1423+
if (vputils::isSingleScalar(Store->getStoredValue()))
1424+
return true;
14241425

14251426
if (auto *VPI = dyn_cast<VPInstruction>(U))
14261427
if (VPI->isSingleScalar() ||

0 commit comments

Comments
 (0)