[all-commits] [llvm/llvm-project] ac0b62: AMDGPU: Do not tail call if an inreg argument requ...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Oct 3 10:50:02 PDT 2024


  Branch: refs/heads/users/arsenm/amdgpu-fix-tail-call-inreg-arguments
  Home:   https://github.com/llvm/llvm-project
  Commit: ac0b62834e39264a02656301515c8023b350b33d
      https://github.com/llvm/llvm-project/commit/ac0b62834e39264a02656301515c8023b350b33d
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.h
    M llvm/test/CodeGen/AMDGPU/isel-amdgcn-cs-chain-intrinsic-w32.ll
    M llvm/test/CodeGen/AMDGPU/isel-amdgcn-cs-chain-intrinsic-w64.ll
    A llvm/test/CodeGen/AMDGPU/tail-call-inreg-arguments.error.ll
    A llvm/test/CodeGen/AMDGPU/tail-call-inreg-arguments.ll

  Log Message:
  -----------
  AMDGPU: Do not tail call if an inreg argument requires waterfalling

If we have a divergent value passed to an outgoing inreg argument,
the call needs to be executed in a waterfall loop and thus cannot
be tail called.

The waterfall handling of arbitrary calls is broken on the selectiondag
path, so some of these cases still hit an error later.

I also noticed the argument evaluation code in isEligibleForTailCallOptimization
is not correctly accounting for implicit argument assignments. It also seems
inreg codegen is generally broken; we are assigning arguments to the reserved
private resource descriptor.



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