[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 06:15:00 PDT 2025


https://github.com/nikic requested changes to this pull request.

So if I understand correctly, you are marking memsets as unsplittable, lowering them to vector zero and smaller accesses to inserts/extracts.

I don't think your general approach here is going to work. We need to be careful about introducing vector operations out of thin air, because LLVM is not going to second guess them. If you convert a memset to <32768 x i8> ops here, LLVM is going to carry those all they down, even though this is almost certainly not performant. Additionally, you are breaking the ability for SROA to split the alloca and fully promote parts of it.



https://github.com/llvm/llvm-project/pull/133301


More information about the llvm-commits mailing list