Debian Codegraph @

clang/test/CodeGen/X86/avxvnni-builtins.c

raw
1 // RUN: %clang_cc1 -x c -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avxvnni -emit-llvm -o - -Wall -Werror | FileCheck %s
2 // RUN: %clang_cc1 -x c -ffreestanding %s -triple=i386-apple-darwin -target-feature +avxvnni -emit-llvm -o - -Wall -Werror | FileCheck %s
3 // RUN: %clang_cc1 -x c++ -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avxvnni -emit-llvm -o - -Wall -Werror | FileCheck %s
4 // RUN: %clang_cc1 -x c++ -ffreestanding %s -triple=i386-apple-darwin -target-feature +avxvnni -emit-llvm -o - -Wall -Werror | FileCheck %s
5
6 #include <immintrin.h>
7
8 __m256i test_mm256_dpbusd_epi32(__m256i __S, __m256i __A, __m256i __B) {
9 // CHECK-LABEL: test_mm256_dpbusd_epi32
10 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
11 return _mm256_dpbusd_epi32(__S, __A, __B);
12 }
13
14 __m256i test_mm256_dpbusds_epi32(__m256i __S, __m256i __A, __m256i __B) {
15 // CHECK-LABEL: test_mm256_dpbusds_epi32
16 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
17 return _mm256_dpbusds_epi32(__S, __A, __B);
18 }
19
20 __m256i test_mm256_dpwssd_epi32(__m256i __S, __m256i __A, __m256i __B) {
21 // CHECK-LABEL: test_mm256_dpwssd_epi32
22 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
23 return _mm256_dpwssd_epi32(__S, __A, __B);
24 }
25
26 __m256i test_mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B) {
27 // CHECK-LABEL: test_mm256_dpwssds_epi32
28 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
29 return _mm256_dpwssds_epi32(__S, __A, __B);
30 }
31
32 __m128i test_mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) {
33 // CHECK-LABEL: test_mm_dpbusd_epi32
34 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
35 return _mm_dpbusd_epi32(__S, __A, __B);
36 }
37
38 __m128i test_mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) {
39 // CHECK-LABEL: test_mm_dpbusds_epi32
40 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
41 return _mm_dpbusds_epi32(__S, __A, __B);
42 }
43
44 __m128i test_mm_dpwssd_epi32(__m128i __S, __m128i __A, __m128i __B) {
45 // CHECK-LABEL: test_mm_dpwssd_epi32
46 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
47 return _mm_dpwssd_epi32(__S, __A, __B);
48 }
49
50 __m128i test_mm_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B) {
51 // CHECK-LABEL: test_mm_dpwssds_epi32
52 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
53 return _mm_dpwssds_epi32(__S, __A, __B);
54 }
55
56 __m256i test_mm256_dpbusd_avx_epi32(__m256i __S, __m256i __A, __m256i __B) {
57 // CHECK-LABEL: test_mm256_dpbusd_avx_epi32
58 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
59 return _mm256_dpbusd_avx_epi32(__S, __A, __B);
60 }
61
62 __m256i test_mm256_dpbusds_avx_epi32(__m256i __S, __m256i __A, __m256i __B) {
63 // CHECK-LABEL: test_mm256_dpbusds_avx_epi32
64 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
65 return _mm256_dpbusds_avx_epi32(__S, __A, __B);
66 }
67
68 __m256i test_mm256_dpwssd_avx_epi32(__m256i __S, __m256i __A, __m256i __B) {
69 // CHECK-LABEL: test_mm256_dpwssd_avx_epi32
70 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssd.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
71 return _mm256_dpwssd_avx_epi32(__S, __A, __B);
72 }
73
74 __m256i test_mm256_dpwssds_avx_epi32(__m256i __S, __m256i __A, __m256i __B) {
75 // CHECK-LABEL: test_mm256_dpwssds_avx_epi32
76 // CHECK: call <8 x i32> @llvm.x86.avx512.vpdpwssds.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
77 return _mm256_dpwssds_avx_epi32(__S, __A, __B);
78 }
79
80 __m128i test_mm_dpbusd_avx_epi32(__m128i __S, __m128i __A, __m128i __B) {
81 // CHECK-LABEL: test_mm_dpbusd_avx_epi32
82 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
83 return _mm_dpbusd_avx_epi32(__S, __A, __B);
84 }
85
86 __m128i test_mm_dpbusds_avx_epi32(__m128i __S, __m128i __A, __m128i __B) {
87 // CHECK-LABEL: test_mm_dpbusds_avx_epi32
88 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
89 return _mm_dpbusds_avx_epi32(__S, __A, __B);
90 }
91
92 __m128i test_mm_dpwssd_avx_epi32(__m128i __S, __m128i __A, __m128i __B) {
93 // CHECK-LABEL: test_mm_dpwssd_avx_epi32
94 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssd.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
95 return _mm_dpwssd_avx_epi32(__S, __A, __B);
96 }
97
98 __m128i test_mm_dpwssds_avx_epi32(__m128i __S, __m128i __A, __m128i __B) {
99 // CHECK-LABEL: test_mm_dpwssds_avx_epi32
100 // CHECK: call <4 x i32> @llvm.x86.avx512.vpdpwssds.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
101 return _mm_dpwssds_avx_epi32(__S, __A, __B);
102 }