[all-commits] [llvm/llvm-project] fca80b: [AMDGPU][ASAN] Move allocas to entry block in amdg...

Chaitanya via All-commits all-commits at lists.llvm.org
Thu Apr 16 22:45:11 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fca80b4ff3fc00d95a1ae6412e838c04443f55ef
      https://github.com/llvm/llvm-project/commit/fca80b4ff3fc00d95a1ae6412e838c04443f55ef
  Author: Chaitanya <Krishna.Sankisa at amd.com>
  Date:   2026-04-17 (Fri, 17 Apr 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
    A llvm/test/CodeGen/AMDGPU/amdgpu-sw-lower-lds-static-alloca-placement.ll

  Log Message:
  -----------
  [AMDGPU][ASAN] Move allocas to entry block in amdgpu-sw-lower-lds pass (#190772)

The `amdgpu-sw-lower-lds` pass inserts a workitem-0 check, malloc, and
barrier before the original entry block, creating a new entry block.
This pushes the original allocas into a non-entry block, causing LLVM to
treat them as dynamic allocas.

AMDGPU backend generates incorrect flat addresses for dynamic alloca
addrspacecasts at -O0, causing memory faults when ASan is enabled with
LDS.

This PR hoists constant-size allocas to the new entry block so they
remain static.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list