| 1 |
// REQUIRES: amdgpu-registered-target |
| 2 |
|
| 3 |
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1200 -verify -emit-llvm -o - %s |
| 4 |
|
| 5 |
typedef unsigned int uint; |
| 6 |
|
| 7 |
#pragma OPENCL EXTENSION cl_khr_fp64:enable |
| 8 |
|
| 9 |
typedef float v2f __attribute__((ext_vector_type(2))); |
| 10 |
typedef float v4f __attribute__((ext_vector_type(4))); |
| 11 |
typedef float v16f __attribute__((ext_vector_type(16))); |
| 12 |
typedef float v32f __attribute__((ext_vector_type(32))); |
| 13 |
typedef half v4h __attribute__((ext_vector_type(4))); |
| 14 |
typedef half v8h __attribute__((ext_vector_type(8))); |
| 15 |
typedef half v16h __attribute__((ext_vector_type(16))); |
| 16 |
typedef half v32h __attribute__((ext_vector_type(32))); |
| 17 |
typedef int v2i __attribute__((ext_vector_type(2))); |
| 18 |
typedef int v4i __attribute__((ext_vector_type(4))); |
| 19 |
typedef int v16i __attribute__((ext_vector_type(16))); |
| 20 |
typedef int v32i __attribute__((ext_vector_type(32))); |
| 21 |
typedef short v2s __attribute__((ext_vector_type(2))); |
| 22 |
typedef short v4s __attribute__((ext_vector_type(4))); |
| 23 |
typedef short v8s __attribute__((ext_vector_type(8))); |
| 24 |
typedef short v16s __attribute__((ext_vector_type(16))); |
| 25 |
typedef short v32s __attribute__((ext_vector_type(32))); |
| 26 |
typedef double v4d __attribute__((ext_vector_type(4))); |
| 27 |
|
| 28 |
void builtin_test_unsupported(double a_double, float a_float, |
| 29 |
int a_int, long a_long, |
| 30 |
v4d a_v4d, |
| 31 |
v2s a_v2s, v4s a_v4s, v8s a_v8s, |
| 32 |
v2i a_v2i, v4i a_v4i, v16i a_v16i, v32i a_v32i, |
| 33 |
v2f a_v2f, v4f a_v4f, v16f a_v16f, v32f a_v32f, |
| 34 |
v4h a_v4h, v8h a_v8h, |
| 35 |
|
| 36 |
uint a, uint b) { |
| 37 |
|
| 38 |
__builtin_amdgcn_ds_gws_init(a, b); // expected-error {{'__builtin_amdgcn_ds_gws_init' needs target feature gws}} |
| 39 |
__builtin_amdgcn_ds_gws_barrier(a, b); // expected-error {{'__builtin_amdgcn_ds_gws_barrier' needs target feature gws}} |
| 40 |
__builtin_amdgcn_ds_gws_sema_v(a); // expected-error {{'__builtin_amdgcn_ds_gws_sema_v' needs target feature gws}} |
| 41 |
__builtin_amdgcn_ds_gws_sema_br(a, b); // expected-error {{'__builtin_amdgcn_ds_gws_sema_br' needs target feature gws}} |
| 42 |
__builtin_amdgcn_ds_gws_sema_p(a); // expected-error {{'__builtin_amdgcn_ds_gws_sema_p' needs target feature gws}} |
| 43 |
|
| 44 |
a_v32f = __builtin_amdgcn_mfma_f32_32x32x1f32(a_float, a_float, a_v32f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x1f32' needs target feature mai-insts}} |
| 45 |
a_v16f = __builtin_amdgcn_mfma_f32_16x16x1f32(a_float, a_float, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x1f32' needs target feature mai-insts}} |
| 46 |
a_v4f = __builtin_amdgcn_mfma_f32_4x4x1f32(a_float, a_float, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_4x4x1f32' needs target feature mai-insts}} |
| 47 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x2f32(a_float, a_float, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x2f32' needs target feature mai-insts}} |
| 48 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x4f32(a_float, a_float, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x4f32' needs target feature mai-insts}} |
| 49 |
a_v32f = __builtin_amdgcn_mfma_f32_32x32x4f16(a_v4h, a_v4h, a_v32f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x4f16' needs target feature mai-insts}} |
| 50 |
a_v16f = __builtin_amdgcn_mfma_f32_16x16x4f16(a_v4h, a_v4h, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x4f16' needs target feature mai-insts}} |
| 51 |
a_v4f = __builtin_amdgcn_mfma_f32_4x4x4f16(a_v4h, a_v4h, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_4x4x4f16' needs target feature mai-insts}} |
| 52 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x8f16(a_v4h, a_v4h, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x8f16' needs target feature mai-insts}} |
| 53 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x16f16(a_v4h, a_v4h, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x16f16' needs target feature mai-insts}} |
| 54 |
a_v32i = __builtin_amdgcn_mfma_i32_32x32x4i8(a_int, a_int, a_v32i, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_i32_32x32x4i8' needs target feature mai-insts}} |
| 55 |
a_v16i = __builtin_amdgcn_mfma_i32_16x16x4i8(a_int, a_int, a_v16i, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_i32_16x16x4i8' needs target feature mai-insts}} |
| 56 |
a_v4i = __builtin_amdgcn_mfma_i32_4x4x4i8(a_int, a_int, a_v4i, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_i32_4x4x4i8' needs target feature mai-insts}} |
| 57 |
a_v16i = __builtin_amdgcn_mfma_i32_32x32x8i8(a_int, a_int, a_v16i, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_i32_32x32x8i8' needs target feature mai-insts}} |
| 58 |
a_v4i = __builtin_amdgcn_mfma_i32_16x16x16i8(a_int, a_int, a_v4i, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_i32_16x16x16i8' needs target feature mai-insts}} |
| 59 |
a_v32f = __builtin_amdgcn_mfma_f32_32x32x2bf16(a_v2s, a_v2s, a_v32f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x2bf16' needs target feature mai-insts}} |
| 60 |
a_v16f = __builtin_amdgcn_mfma_f32_16x16x2bf16(a_v2s, a_v2s, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x2bf16' needs target feature mai-insts}} |
| 61 |
a_v4f = __builtin_amdgcn_mfma_f32_4x4x2bf16(a_v2s, a_v2s, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_4x4x2bf16' needs target feature mai-insts}} |
| 62 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x4bf16(a_v2s, a_v2s, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x4bf16' needs target feature mai-insts}} |
| 63 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x8bf16(a_v2s, a_v2s, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x8bf16' needs target feature mai-insts}} |
| 64 |
a_v32f = __builtin_amdgcn_mfma_f32_32x32x4bf16_1k(a_v4s, a_v4s, a_v32f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x4bf16_1k' needs target feature mai-insts}} |
| 65 |
a_v16f = __builtin_amdgcn_mfma_f32_16x16x4bf16_1k(a_v4s, a_v4s, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x4bf16_1k' needs target feature mai-insts}} |
| 66 |
a_v4f = __builtin_amdgcn_mfma_f32_4x4x4bf16_1k(a_v4s, a_v4s, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_4x4x4bf16_1k' needs target feature mai-insts}} |
| 67 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x8bf16_1k(a_v4s, a_v4s, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x8bf16_1k' needs target feature mai-insts}} |
| 68 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x16bf16_1k(a_v4s, a_v4s, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x16bf16_1k' needs target feature mai-insts}} |
| 69 |
a_v4d = __builtin_amdgcn_mfma_f64_16x16x4f64(a_double, a_double, a_v4d, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f64_16x16x4f64' needs target feature mai-insts}} |
| 70 |
a_double = __builtin_amdgcn_mfma_f64_4x4x4f64(a_double, a_double, a_double, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f64_4x4x4f64' needs target feature mai-insts}} |
| 71 |
a_v4i = __builtin_amdgcn_mfma_i32_16x16x32_i8(a_long, a_long, a_v4i, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_i32_16x16x32_i8' needs target feature mai-insts}} |
| 72 |
a_v16i = __builtin_amdgcn_mfma_i32_32x32x16_i8(a_long, a_long, a_v16i, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_i32_32x32x16_i8' needs target feature mai-insts}} |
| 73 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x8_xf32(a_v2f, a_v2f, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x8_xf32' needs target feature mai-insts}} |
| 74 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x4_xf32(a_v2f, a_v2f, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x4_xf32' needs target feature mai-insts}} |
| 75 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x32_bf8_bf8(a_long, a_long, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x32_bf8_bf8' needs target feature fp8-insts}} |
| 76 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x32_bf8_fp8(a_long, a_long, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x32_bf8_fp8' needs target feature fp8-insts}} |
| 77 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x32_fp8_bf8(a_long, a_long, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x32_fp8_bf8' needs target feature fp8-insts}} |
| 78 |
a_v4f = __builtin_amdgcn_mfma_f32_16x16x32_fp8_fp8(a_long, a_long, a_v4f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_16x16x32_fp8_fp8' needs target feature fp8-insts}} |
| 79 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x16_bf8_bf8(a_long, a_long, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x16_bf8_bf8' needs target feature fp8-insts}} |
| 80 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x16_bf8_fp8(a_long, a_long, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x16_bf8_fp8' needs target feature fp8-insts}} |
| 81 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x16_fp8_bf8(a_long, a_long, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x16_fp8_bf8' needs target feature fp8-insts}} |
| 82 |
a_v16f = __builtin_amdgcn_mfma_f32_32x32x16_fp8_fp8(a_long, a_long, a_v16f, 0, 0, 0); // expected-error {{'__builtin_amdgcn_mfma_f32_32x32x16_fp8_fp8' needs target feature fp8-insts}} |
| 83 |
a_v4f = __builtin_amdgcn_smfmac_f32_16x16x32_f16(a_v4h, a_v8h, a_v4f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_16x16x32_f16' needs target feature mai-insts}} |
| 84 |
a_v16f = __builtin_amdgcn_smfmac_f32_32x32x16_f16(a_v4h, a_v8h, a_v16f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_32x32x16_f16' needs target feature mai-insts}} |
| 85 |
a_v4f = __builtin_amdgcn_smfmac_f32_16x16x32_bf16(a_v4s, a_v8s, a_v4f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_16x16x32_bf16' needs target feature mai-insts}} |
| 86 |
a_v16f = __builtin_amdgcn_smfmac_f32_32x32x16_bf16(a_v4s, a_v8s, a_v16f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_32x32x16_bf16' needs target feature mai-insts}} |
| 87 |
a_v4i = __builtin_amdgcn_smfmac_i32_16x16x64_i8(a_v2i, a_v4i, a_v4i, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_i32_16x16x64_i8' needs target feature mai-insts}} |
| 88 |
a_v16i = __builtin_amdgcn_smfmac_i32_32x32x32_i8(a_v2i, a_v4i, a_v16i, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_i32_32x32x32_i8' needs target feature mai-insts}} |
| 89 |
a_v4f = __builtin_amdgcn_smfmac_f32_16x16x64_bf8_bf8(a_v2i, a_v4i, a_v4f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_16x16x64_bf8_bf8' needs target feature fp8-insts}} |
| 90 |
a_v4f = __builtin_amdgcn_smfmac_f32_16x16x64_bf8_fp8(a_v2i, a_v4i, a_v4f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_16x16x64_bf8_fp8' needs target feature fp8-insts}} |
| 91 |
a_v4f = __builtin_amdgcn_smfmac_f32_16x16x64_fp8_bf8(a_v2i, a_v4i, a_v4f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_16x16x64_fp8_bf8' needs target feature fp8-insts}} |
| 92 |
a_v4f = __builtin_amdgcn_smfmac_f32_16x16x64_fp8_fp8(a_v2i, a_v4i, a_v4f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_16x16x64_fp8_fp8' needs target feature fp8-insts}} |
| 93 |
a_v16f = __builtin_amdgcn_smfmac_f32_32x32x32_bf8_bf8(a_v2i, a_v4i, a_v16f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_32x32x32_bf8_bf8' needs target feature fp8-insts}} |
| 94 |
a_v16f = __builtin_amdgcn_smfmac_f32_32x32x32_bf8_fp8(a_v2i, a_v4i, a_v16f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_32x32x32_bf8_fp8' needs target feature fp8-insts}} |
| 95 |
a_v16f = __builtin_amdgcn_smfmac_f32_32x32x32_fp8_bf8(a_v2i, a_v4i, a_v16f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_32x32x32_fp8_bf8' needs target feature fp8-insts}} |
| 96 |
a_v16f = __builtin_amdgcn_smfmac_f32_32x32x32_fp8_fp8(a_v2i, a_v4i, a_v16f, a_int, 0, 0); // expected-error {{'__builtin_amdgcn_smfmac_f32_32x32x32_fp8_fp8' needs target feature fp8-insts}} |
| 97 |
} |