]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn: Fix VGPR max count
authorAndrew Stubbs <ams@baylibre.com>
Wed, 7 Aug 2024 15:35:18 +0000 (15:35 +0000)
committerAndrew Stubbs <ams@baylibre.com>
Thu, 8 Aug 2024 16:28:13 +0000 (16:28 +0000)
commit715317331994d3d69395056f77bfe7ac613af009
tree04cfc15c7eebee138c7cbb4cf7e4601f075be693
parent89d2f3fefb0ae6dd4eb76f25009aa15735f09ed4
amdgcn: Fix VGPR max count

The metadata for RDNA3 kernels allocates VGPRs in blocks of 12, which means the
maximum usable number of registers is 252.  This patch prevents the compiler
from exceeding this artifical limit.

gcc/ChangeLog:

* config/gcn/gcn.cc (gcn_conditional_register_usage): Fix registers
remaining after maximum allocation using TARGET_VGPR_GRANULARITY.
gcc/config/gcn/gcn.cc