[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenOpenCL / builtins-amdgcn-wmma-w64.cl
blob99664b244328872138dcf054f0956cf1a4372380
1 // REQUIRES: amdgpu-registered-target
2 // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1100 -DWMMA_GFX1100_TESTS -S -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-GFX1100
4 typedef float v4f __attribute__((ext_vector_type(4)));
5 typedef float v8f __attribute__((ext_vector_type(8)));
6 typedef half v8h __attribute__((ext_vector_type(8)));
7 typedef half v16h __attribute__((ext_vector_type(16)));
8 typedef int v2i __attribute__((ext_vector_type(2)));
9 typedef int v4i __attribute__((ext_vector_type(4)));
10 typedef int v8i __attribute__((ext_vector_type(8)));
11 typedef short v8s __attribute__((ext_vector_type(8)));
12 typedef short v16s __attribute__((ext_vector_type(16)));
14 #ifdef WMMA_GFX1100_TESTS
16 // Wave64
19 // amdgcn_wmma_f32_16x16x16_f16
22 // CHECK-GFX1100-LABEL: @test_amdgcn_wmma_f32_16x16x16_f16_w64
23 // CHECK-GFX1100: call <4 x float> @llvm.amdgcn.wmma.f32.16x16x16.f16.v4f32(<16 x half> %a, <16 x half> %b, <4 x float> %c)
24 void test_amdgcn_wmma_f32_16x16x16_f16_w64(global v4f* out, v16h a, v16h b, v4f c)
26 *out = __builtin_amdgcn_wmma_f32_16x16x16_f16_w64(a, b, c);
30 // amdgcn_wmma_f32_16x16x16_bf16
33 // CHECK-GFX1100-LABEL: @test_amdgcn_wmma_f32_16x16x16_bf16_w64
34 // CHECK-GFX1100: call <4 x float> @llvm.amdgcn.wmma.f32.16x16x16.bf16.v4f32(<16 x i16> %a, <16 x i16> %b, <4 x float> %c)
35 void test_amdgcn_wmma_f32_16x16x16_bf16_w64(global v4f* out, v16s a, v16s b, v4f c)
37 *out = __builtin_amdgcn_wmma_f32_16x16x16_bf16_w64(a, b, c);
41 // amdgcn_wmma_f16_16x16x16_f16
44 // CHECK-GFX1100-LABEL: @test_amdgcn_wmma_f16_16x16x16_f16_w64
45 // CHECK-GFX1100: call <8 x half> @llvm.amdgcn.wmma.f16.16x16x16.f16.v8f16(<16 x half> %a, <16 x half> %b, <8 x half> %c, i1 true)
46 void test_amdgcn_wmma_f16_16x16x16_f16_w64(global v8h* out, v16h a, v16h b, v8h c)
48 *out = __builtin_amdgcn_wmma_f16_16x16x16_f16_w64(a, b, c, true);
52 // amdgcn_wmma_bf16_16x16x16_bf16
55 // CHECK-GFX1100-LABEL: @test_amdgcn_wmma_bf16_16x16x16_bf16_w64
56 // CHECK-GFX1100: call <8 x i16> @llvm.amdgcn.wmma.bf16.16x16x16.bf16.v8i16(<16 x i16> %a, <16 x i16> %b, <8 x i16> %c, i1 true)
57 void test_amdgcn_wmma_bf16_16x16x16_bf16_w64(global v8s* out, v16s a, v16s b, v8s c)
59 *out = __builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64(a, b, c, true);
63 // amdgcn_wmma_i32_16x16x16_iu8
66 // CHECK-GFX1100-LABEL: @test_amdgcn_wmma_i32_16x16x16_iu8_w64
67 // CHECK-GFX1100: call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8.v4i32(i1 true, <4 x i32> %a, i1 true, <4 x i32> %b, <4 x i32> %c, i1 false)
68 void test_amdgcn_wmma_i32_16x16x16_iu8_w64(global v4i* out, v4i a, v4i b, v4i c)
70 *out = __builtin_amdgcn_wmma_i32_16x16x16_iu8_w64(true, a, true, b, c, false);
74 // amdgcn_wmma_i32_16x16x16_iu4
77 // CHECK-GFX1100-LABEL: @test_amdgcn_wmma_i32_16x16x16_iu4_w64
78 // CHECK-GFX1100: call <4 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu4.v4i32(i1 true, <2 x i32> %a, i1 true, <2 x i32> %b, <4 x i32> %c, i1 false)
79 void test_amdgcn_wmma_i32_16x16x16_iu4_w64(global v4i* out, v2i a, v2i b, v4i c)
81 *out = __builtin_amdgcn_wmma_i32_16x16x16_iu4_w64(true, a, true, b, c, false);
84 #endif