[AMDGPU] Reserve extra SGPR blocks wth XNACK "any" TID Setting
authorAustin Kerbow <Austin.Kerbow@amd.com>
Mon, 6 Mar 2023 18:10:14 +0000 (10:10 -0800)
committerAustin Kerbow <Austin.Kerbow@amd.com>
Sat, 18 Mar 2023 03:26:23 +0000 (20:26 -0700)
commit864a2b25beac507cc76b50030757283aae434c0c
tree82fcc9b1f01639db90983ae4037bb2dbf270bda7
parentb5c862e15caf4d8aa34bbc6ee25af8da9a9405a4
[AMDGPU] Reserve extra SGPR blocks wth XNACK "any" TID Setting

ASMPrinter was relying on feature bits to setup extra SGRPs in the knerel
descriptor for the xnack_mask. This was broken for the dynamic XNACK "any" TID
setting which could cause user SGPRs to be clobbered if the number of SGPRs
reserved was near a granulated block boundary.

When XNACK was enabled this worked correctly in the ASMParser which meant some
kernels were only failing without "-save-temps".

Fixes: SWDEV-382764

Reviewed By: kzhuravl

Differential Revision: https://reviews.llvm.org/D145401
clang/test/Frontend/amdgcn-machine-analysis-remarks.cl
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
llvm/test/CodeGen/AMDGPU/amdpal-callable.ll
llvm/test/CodeGen/AMDGPU/occupancy-levels.ll
llvm/test/CodeGen/AMDGPU/resource-optimization-remarks.ll
llvm/test/CodeGen/AMDGPU/tid-kd-xnack-any.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/tid-kd-xnack-off.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/tid-kd-xnack-on.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/trap-abis.ll