[PATCH] D146225: [AMDGPU] Handle memset users in PromoteAlloca

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 00:46:34 PDT 2023


Pierre-vh added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/promote-alloca-memset.ll:31
+  store i64 %val, ptr addrspace(5) %stack
+  ret void
+}
----------------
jdoerfert wrote:
> the store of val is dead and SROA drops it. What is the point?
> Fixing the test and I see reasonable SROA output, what is missing? https://godbolt.org/z/Pacce89fY
What I'm trying to do here is verify our assumption that the memset is correctly interpreted by SROA & removed. (Which is verified by the presence of the zeroinitializer in the insertelement)
The interesting check line is the OPT one, the SROA check is just to ensure the alloca is removed after.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146225/new/

https://reviews.llvm.org/D146225



More information about the llvm-commits mailing list