[llvm] [RFC][NFCI][IR] Extract AMDGPU-specific verification logic into `VerifierAMDGPU.cpp` (PR #204284)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 08:45:42 PDT 2026
shiltian wrote:
> LGTM, though I'd like to know if it makes sense to `#if (we're building the AMDGPU target)` these function bodies.
It depends. Right now, we already have two places that check `isAMDGPU`. One is to verify that when `reqd_work_group_size` is present, `amdgpu-flat-work-group-size` also exists and is valid. The other is to verify that `alloca` is in AS5. We can't enforce either of these unconditionally, so a target check is necessary in those cases.
That said, I want to emphasize that this split is not intended to do AMDGPU-related checks based on the compiler target, at least not in this PR. It's also not meant to validate generic IR attributes or characteristics differently based on the target.
https://github.com/llvm/llvm-project/pull/204284
More information about the llvm-commits
mailing list