AMDGPU/clang: Add builtins for llvm.amdgcn.ballot
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 18 Jun 2020 01:46:28 +0000 (21:46 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 29 Dec 2022 22:58:55 +0000 (17:58 -0500)
commitf4bcd7f598331457cfe74e459b489d4098369511
treea6927566a6b73a9eed52ef9b132da005480613e3
parentc823517ef5f2ac0fafede18782d089a8aa91ed7b
AMDGPU/clang: Add builtins for llvm.amdgcn.ballot

Use explicit _w32/_w64 suffixes for the wave size to be consistent
with the existing other wave dependent intrinsics. Also start
diagnosing trying to use both wave32 and wave64.

I would have preferred to avoid the +wavefrontsize64 spam on targets
where that's the only option, but avoiding this seems to be more work
than I expected.
clang/include/clang/Basic/BuiltinsAMDGPU.def
clang/lib/Basic/Targets/AMDGPU.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGenOpenCL/amdgpu-features-illegal.cl [new file with mode: 0644]
clang/test/CodeGenOpenCL/amdgpu-features.cl
clang/test/CodeGenOpenCL/builtins-amdgcn-gfx10.cl
clang/test/CodeGenOpenCL/builtins-amdgcn-wave32.cl [new file with mode: 0644]
clang/test/CodeGenOpenCL/builtins-amdgcn-wave64.cl [new file with mode: 0644]
clang/test/OpenMP/amdgcn-attributes.cpp
clang/test/SemaOpenCL/builtins-amdgcn-error-wave32.cl [new file with mode: 0644]
clang/test/SemaOpenCL/builtins-amdgcn-error-wave64.cl [new file with mode: 0644]