diff --git a/clang/include/clang/Basic/BuiltinsAMDGPU.def b/clang/include/clang/Basic/BuiltinsAMDGPU.def index a19c8bd5f219e..8b59b3790d7bc 100644 --- a/clang/include/clang/Basic/BuiltinsAMDGPU.def +++ b/clang/include/clang/Basic/BuiltinsAMDGPU.def @@ -150,8 +150,8 @@ BUILTIN(__builtin_amdgcn_mqsad_u32_u8, "V4UiWUiUiV4Ui", "nc") // Ballot builtins. //===----------------------------------------------------------------------===// -TARGET_BUILTIN(__builtin_amdgcn_ballot_w32, "Uib", "nc", "wavefrontsize32") -TARGET_BUILTIN(__builtin_amdgcn_ballot_w64, "LUib", "nc", "wavefrontsize64") +TARGET_BUILTIN(__builtin_amdgcn_ballot_w32, "ZUib", "nc", "wavefrontsize32") +TARGET_BUILTIN(__builtin_amdgcn_ballot_w64, "WUib", "nc", "wavefrontsize64") // Deprecated intrinsics in favor of __builtin_amdgn_ballot_{w32|w64} BUILTIN(__builtin_amdgcn_uicmp, "WUiUiUiIi", "nc") diff --git a/clang/test/CodeGenHIP/ballot.cpp b/clang/test/CodeGenHIP/ballot.cpp index 6e1cbbdfc7af1..a1c23e2136c71 100644 --- a/clang/test/CodeGenHIP/ballot.cpp +++ b/clang/test/CodeGenHIP/ballot.cpp @@ -1,5 +1,4 @@ // REQUIRES: amdgpu-registered-target -// XFAIL: * // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-pc-windows-msvc -target-cpu gfx900 -x hip -emit-llvm -fcuda-is-device -o - %s | FileCheck %s // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-pc-windows-msvc -target-cpu gfx900 -x hip -S -fcuda-is-device -o - %s | FileCheck %s --check-prefix=GFX9 @@ -9,11 +8,6 @@ // cross-compiles to Windows to confirm that the return type is indeed 64 bits // on Windows. -// FIXME: The Clang declaration of the wave-64 builtin uses "UL" as the return -// type, which is interpreted as a 32-bit unsigned integer on Windows. This -// emits an incorrect LLVM declaration with i32 return type instead of i64. The -// clang declaration needs to be fixed to use "WU" instead. - // CHECK-LABEL: @_Z3fooi // CHECK: call i64 @llvm.amdgcn.ballot.i64