[all-commits] [llvm/llvm-project] 6ec8c4: [AMDGPU] Enable i8 GEP promotion for vector alloca...

Harrison Hao via All-commits all-commits at lists.llvm.org
Sun Dec 7 20:13:30 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6ec8c4351cfc1d0627d1633b02ea787bd29c77d8
      https://github.com/llvm/llvm-project/commit/6ec8c4351cfc1d0627d1633b02ea787bd29c77d8
  Author: Harrison Hao <57025411+harrisonGPU at users.noreply.github.com>
  Date:   2025-12-08 (Mon, 08 Dec 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
    M llvm/test/CodeGen/AMDGPU/promote-alloca-vector-gep.ll

  Log Message:
  -----------
  [AMDGPU] Enable i8 GEP promotion for vector allocas (#166132)

This patch adds support for the pattern:
```llvm
  %index = select i1 %idx_sel, i32 0, i32 4
  %elt = getelementptr inbounds i8, ptr addrspace(5) %alloca, i32 %index
```
by scaling the byte offset to an element index (index >>
log2(ElemSize)),
allowing the vector element to be updated with insertelement instead of
using
scratch memory.



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