[PATCH] D128073: [SROA] Try harder to find a vector promotion viable type when rewriting
Vang Thao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 10:51:33 PDT 2022
vangthao added a comment.
In D128073#3612757 <https://reviews.llvm.org/D128073#3612757>, @nikic wrote:
> I'm not sure I understand how this change works. isVectorPromotionViable() doesn't seem to use SliceTy at all, it computes its own candidate types. Why does the picked slice type matter for vector promotion?
The picked slice type matters because rewritePartition() will attempt to convert the slice users to that type. This won't matter for isVectorPromotionViable() during the first pass over the alloca partition but during the second pass. The second pass over the alloca partition, isVectorPromotionViable() will check the type of any loads or stores that are the exact size of the partition. If we were able to convert those loads and stores into our picked slice type of the first iteration, then it will be used here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128073/new/
https://reviews.llvm.org/D128073
More information about the llvm-commits
mailing list