Skip to content

Commit a20f3bf

Browse files
committed
fixup! [SROA] Vector promote some memsets
1 parent ac62b8d commit a20f3bf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Transforms/Scalar/SROA.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,10 +2445,11 @@ static VectorType *isVectorPromotionViable(Partition &P, const DataLayout &DL,
24452445
Ty = LI->getType();
24462446
else if (auto *SI = dyn_cast<StoreInst>(S.getUse()->getUser()))
24472447
Ty = SI->getValueOperand()->getType();
2448-
else if (auto *II = dyn_cast<MemSetInst>(S.getUse()->getUser()))
2448+
else if (auto *II = dyn_cast<MemSetInst>(S.getUse()->getUser())) {
24492449
Ty = getVectorTypeFor(*II, DL);
2450-
2451-
if (!Ty)
2450+
if (!Ty)
2451+
continue;
2452+
} else
24522453
continue;
24532454

24542455
auto CandTy = Ty->getScalarType();

0 commit comments

Comments
 (0)