[clang] [AMDGPU] Allow w64 ballot to be used on w32 targets (PR #80183)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 1 05:43:41 PST 2024
================
@@ -4,13 +4,10 @@
// RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -target-feature -wavefrontsize64 -verify -S -o - %s
// RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -verify -S -o - %s
+// expected-no-diagnostics
+
typedef unsigned long ulong;
void test_ballot_wave64(global ulong* out, int a, int b) {
- *out = __builtin_amdgcn_ballot_w64(a == b); // expected-error {{'__builtin_amdgcn_ballot_w64' needs target feature wavefrontsize64}}
-}
-
-__attribute__((target("wavefrontsize64")))
-void test_ballot_wave64_target_attr(global ulong* out, int a, int b) {
----------------
jhuber6 wrote:
If I kept the attribute it would result in
```
(frontend): invalid feature combination: 'wavefrontsize32' and 'wavefrontsize64' are mutually exclusive
```
https://github.com/llvm/llvm-project/pull/80183
More information about the cfe-commits
mailing list