1 // NOTE
: Assertions have been autogenerated by utils
/update_cc_test_checks.py
2 // RUN
: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1100 -target-feature
+wavefrontsize64 -DWMMA_GFX1100_TESTS -S -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
19 // CHECK-GFX1100-LABEL
: test_amdgcn_wmma_f32_16x16x16_f16_w64
:
20 // CHECK-GFX1100
: v_wmma_f32_16x16x16_f16 v
[{{.
*}}], v
[{{.
*}} v
[{{.
*}}], v
[{{.
*}}]
22 void test_amdgcn_wmma_f32_16x16x16_f16_w64
(global v4f
* out
, v16h a
, v16h b
, v4f c
)
24 *out
= __builtin_amdgcn_wmma_f32_16x16x16_f16_w64
(a, b
, c
);
28 // CHECK-GFX1100-LABEL
: test_amdgcn_wmma_f32_16x16x16_bf16_w64
:
29 // CHECK-GFX1100
: v_wmma_f32_16x16x16_bf16 v
[{{.
*}}], v
[{{.
*}} v
[{{.
*}}], v
[{{.
*}}]
31 void test_amdgcn_wmma_f32_16x16x16_bf16_w64
(global v4f
* out
, v16s a
, v16s b
, v4f c
)
33 *out
= __builtin_amdgcn_wmma_f32_16x16x16_bf16_w64
(a, b
, c
);
37 // CHECK-GFX1100-LABEL
: test_amdgcn_wmma_f16_16x16x16_f16_w64
:
38 // CHECK-GFX1100
: v_wmma_f16_16x16x16_f16 v
[{{.
*}}], v
[{{.
*}} v
[{{.
*}}], v
[{{.
*}}] op_sel
:[0,0,1]
40 void test_amdgcn_wmma_f16_16x16x16_f16_w64
(global v8h
* out
, v16h a
, v16h b
, v8h c
)
42 *out
= __builtin_amdgcn_wmma_f16_16x16x16_f16_w64
(a, b
, c
, true
);
46 // CHECK-GFX1100-LABEL
: test_amdgcn_wmma_bf16_16x16x16_bf16_w64
:
47 // CHECK-GFX1100
: v_wmma_bf16_16x16x16_bf16 v
[{{.
*}}], v
[{{.
*}} v
[{{.
*}}], v
[{{.
*}}] op_sel
:[0,0,1]
49 void test_amdgcn_wmma_bf16_16x16x16_bf16_w64
(global v8s
* out
, v16s a
, v16s b
, v8s c
)
51 *out
= __builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64
(a, b
, c
, true
);
55 // CHECK-GFX1100-LABEL
: test_amdgcn_wmma_i32_16x16x16_iu8_w64
:
56 // CHECK-GFX1100
: v_wmma_i32_16x16x16_iu8 v
[{{.
*}}], v
[{{.
*}} v
[{{.
*}} v
[{{.
*}}] neg_lo
:[1,1,0]
58 void test_amdgcn_wmma_i32_16x16x16_iu8_w64
(global v4i
* out
, v4i a
, v4i b
, v4i c
)
60 *out
= __builtin_amdgcn_wmma_i32_16x16x16_iu8_w64
(true, a
, true
, b
, c
, false
);
64 // CHECK-GFX1100-LABEL
: test_amdgcn_wmma_i32_16x16x16_iu4_w64
:
65 // CHECK-GFX1100
: v_wmma_i32_16x16x16_iu4 v
[{{.
*}} v
[{{.
*}} v
[{{.
*}} v
[{{.
*}}neg_lo
:[1,1,0]
67 void test_amdgcn_wmma_i32_16x16x16_iu4_w64
(global v4i
* out
, v2i a
, v2i b
, v4i c
)
69 *out
= __builtin_amdgcn_wmma_i32_16x16x16_iu4_w64
(true, a
, true
, b
, c
, false
);