[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 14:08:03 PDT 2025


jhuber6 wrote:

> We could allow `__builtin_processor_is` as an alternative name for that builtin if folks feel weird about having "cpu" in the name for a GPU target.

We already use `-mcpu=gfx942` for targeting the GPU processor so I don't think it makes a huge difference. I've never heard of `__builtin_cpu_is`, doesn't seem like it has a single test in `clang`. Realistically what the GPU use-case needs is a way to avoid the normal builtin feature checks and guarantee that any children of that check get trimmed at O0 before the backend runs but after clang code generation.

https://github.com/llvm/llvm-project/pull/134016


More information about the llvm-commits mailing list