[llvm] [AMDGPU][PromoteAlloca] Support memsets to ptr allocas (PR #80678)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 05:25:22 PST 2024


================
@@ -84,4 +84,16 @@ entry:
   ret void
 }
 
+define amdgpu_kernel void @memset_ptr_alloca(ptr %out) {
+; CHECK-LABEL: @memset_ptr_alloca(
+; CHECK-NEXT:    store i64 0, ptr [[OUT:%.*]], align 8
+; CHECK-NEXT:    ret void
+;
+  %alloca = alloca [6 x ptr], align 16, addrspace(5)
----------------
Pierre-vh wrote:

We don't promote nested arrays, but I added a test anyway

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


More information about the llvm-commits mailing list