[all-commits] [llvm/llvm-project] 02757c: AMDGPU: Try to reuse dest reg for s_add_i32 frame ...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Oct 4 12:54:04 PDT 2024


  Branch: refs/heads/users/arsenm/fix-s-add-i32-frame-index-regression
  Home:   https://github.com/llvm/llvm-project
  Commit: 02757c8193e8311977527a6fe7b7e20a77120a4c
      https://github.com/llvm/llvm-project/commit/02757c8193e8311977527a6fe7b7e20a77120a4c
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-10-04 (Fri, 04 Oct 2024)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
    M llvm/test/CodeGen/AMDGPU/eliminate-frame-index-s-add-i32.mir
    M llvm/test/CodeGen/AMDGPU/local-stack-alloc-block-sp-reference.ll

  Log Message:
  -----------
  AMDGPU: Try to reuse dest reg for s_add_i32 frame indexes

Hack around the register scavenger doing the wrong thing.
It does not find the result register as available in the
case the frame index add isn't also reading the dest register.
This is the quick fix for a regression where the scavenge would
create a broken spill of SGPR to memory. I believe this is still
broken for cases we cannot use the result register.

I'm confused about what position the scavenger iterator
is supposed to be in, and what RestoreAfter is for. The scavenger
is missing a full set of forward/backward APIs and there seems
to be an off by one somewhere.



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