[PATCH] D76720: [Transforms][SROA] Promote allocas with mem2reg for scalable types
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 11:28:33 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:4599
+ cast<VectorType>(AI->getAllocatedType())->isScalable() &&
+ isAllocaPromotable(AI))
+ PromotableAllocas.push_back(AI);
----------------
This looks weird; did you mean to write something like this?
```
if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) {
if (isa<VectorType>(AI->getAllocatedType()) &&
cast<VectorType>(AI->getAllocatedType())->isScalable()) {
if (isAllocaPromotable(AI))
PromotableAllocas.push_back(AI);
} else {
Worklist.insert(AI);
}
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76720/new/
https://reviews.llvm.org/D76720
More information about the llvm-commits
mailing list