Skip to content

Commit 7075b30

Browse files
committed
fixup! [SROA] Vector promote some memsets
1 parent a9b215b commit 7075b30

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
@@ -2366,10 +2366,11 @@ static VectorType *isVectorPromotionViable(Partition &P, const DataLayout &DL) {
23662366
Ty = LI->getType();
23672367
else if (auto *SI = dyn_cast<StoreInst>(S.getUse()->getUser()))
23682368
Ty = SI->getValueOperand()->getType();
2369-
else if (auto *II = dyn_cast<MemSetInst>(S.getUse()->getUser()))
2369+
else if (auto *II = dyn_cast<MemSetInst>(S.getUse()->getUser())) {
23702370
Ty = getVectorTypeFor(*II, DL);
2371-
2372-
if (!Ty)
2371+
if (!Ty)
2372+
continue;
2373+
} else
23732374
continue;
23742375

23752376
auto CandTy = Ty->getScalarType();

0 commit comments

Comments
 (0)