Skip to content

Commit 0991c13

Browse files
committed
[VPlan] Increase clarity around WidenStore condition (NFC)
1 parent ac735e7 commit 0991c13

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
@@ -1420,8 +1420,9 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
14201420
// broadcasts.
14211421
if (!vputils::isSingleScalar(RepOrWidenR) ||
14221422
!all_of(RepOrWidenR->users(), [RepOrWidenR](const VPUser *U) {
1423-
if (isa<VPWidenStoreRecipe>(U))
1424-
return true;
1423+
if (auto *Store = dyn_cast<VPWidenStoreRecipe>(U))
1424+
if (vputils::isSingleScalar(Store->getStoredValue()))
1425+
return true;
14251426

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

0 commit comments

Comments
 (0)