Skip to content

Commit 707afab

Browse files
committed
[VPlan] Increase clarity around WidenStore condition (NFC)
1 parent 44b24f4 commit 707afab

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
@@ -1412,8 +1412,9 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
14121412
// broadcasts.
14131413
if (!vputils::isSingleScalar(RepOrWidenR) ||
14141414
!all_of(RepOrWidenR->users(), [RepOrWidenR](const VPUser *U) {
1415-
if (isa<VPWidenStoreRecipe>(U))
1416-
return true;
1415+
if (auto *Store = dyn_cast<VPWidenStoreRecipe>(U))
1416+
if (vputils::isSingleScalar(Store->getStoredValue()))
1417+
return true;
14171418

14181419
if (auto *VPI = dyn_cast<VPInstruction>(U))
14191420
if (VPI->isSingleScalar() ||

0 commit comments

Comments
 (0)