[all-commits] [llvm/llvm-project] b1d424: [AMDGPU] Fix hidden kernarg preload count inconsis...
Austin Kerbow via All-commits
all-commits at lists.llvm.org
Sun Dec 8 10:10:30 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b1d42465fc1485d46b4727e6830272f369fb6cb5
https://github.com/llvm/llvm-project/commit/b1d42465fc1485d46b4727e6830272f369fb6cb5
Author: Austin Kerbow <Austin.Kerbow at amd.com>
Date: 2024-12-08 (Sun, 08 Dec 2024)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
M llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
A llvm/test/CodeGen/AMDGPU/invalid-hidden-kernarg-in-kernel-signature.ll
M llvm/test/CodeGen/AMDGPU/preload-implicit-kernargs.ll
Log Message:
-----------
[AMDGPU] Fix hidden kernarg preload count inconsistency (#116759)
It is possible that the number of hidden arguments that are selected to
be preloaded in AMDGPULowerKernel arguments and isel can differ. This
isn't an issue with explicit arguments since isel can lower the argument
correctly either way, but with hidden arguments we may have alignment
issues if we try to load these hidden arguments that were added to the
kernel signature.
The reason for the mismatch is that isel reserves an extra synthetic
user SGPR for module LDS.
Instead of teaching lowerFormalArguments how to handle these properly it
makes more sense and is less expensive to fix the mismatch and assert if
we ever run into this issue again. We should never be trying to lower
these in the normal way.
In a future change we probably want to revise how we track "synthetic"
user SGPRs and unify the handling in GCNUserSGPRUsageInfo. Sometimes
synthetic SGPRSs are considered user SGPRs and sometimes they are not.
Until then this patch resolves the inconsistency, fixes the bug, and is
otherwise a NFC.
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