Debian Codegraph @

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

raw
1 // RUN: %clang_cc1 -x c %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avxvnniint16 -emit-llvm -o - -Wall -Werror | FileCheck %s
2 // RUN: %clang_cc1 -x c %s -ffreestanding -triple=i386-unknown-unknown -target-feature +avxvnniint16 -emit-llvm -o - -Wall -Werror | FileCheck %s
3 // RUN: %clang_cc1 -x c %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s
4 // RUN: %clang_cc1 -x c %s -ffreestanding -triple=i386-unknown-unknown -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s
5 // RUN: %clang_cc1 -x c++ %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avxvnniint16 -emit-llvm -o - -Wall -Werror | FileCheck %s
6 // RUN: %clang_cc1 -x c++ %s -ffreestanding -triple=i386-unknown-unknown -target-feature +avxvnniint16 -emit-llvm -o - -Wall -Werror | FileCheck %s
7 // RUN: %clang_cc1 -x c++ %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s
8 // RUN: %clang_cc1 -x c++ %s -ffreestanding -triple=i386-unknown-unknown -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s
9
10 #include <immintrin.h>
11
12 __m128i test_mm_dpwsud_epi32(__m128i __A, __m128i __B, __m128i __C) {
13 // CHECK-LABEL: test_mm_dpwsud_epi32
14 // CHECK: call <4 x i32> @llvm.x86.avx2.vpdpwsud.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
15 return _mm_dpwsud_epi32(__A, __B, __C);
16 }
17
18 __m256i test_mm256_dpwsud_epi32(__m256i __A, __m256i __B, __m256i __C) {
19 // CHECK-LABEL: test_mm256_dpwsud_epi32
20 // CHECK: call <8 x i32> @llvm.x86.avx2.vpdpwsud.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
21 return _mm256_dpwsud_epi32(__A, __B, __C);
22 }
23
24 __m128i test_mm_dpwsuds_epi32(__m128i __A, __m128i __B, __m128i __C) {
25 // CHECK-LABEL: test_mm_dpwsuds_epi32
26 // CHECK: call <4 x i32> @llvm.x86.avx2.vpdpwsuds.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
27 return _mm_dpwsuds_epi32(__A, __B, __C);
28 }
29
30 __m256i test_mm256_dpwsuds_epi32(__m256i __A, __m256i __B, __m256i __C) {
31 // CHECK-LABEL: test_mm256_dpwsuds_epi32
32 // CHECK: call <8 x i32> @llvm.x86.avx2.vpdpwsuds.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
33 return _mm256_dpwsuds_epi32(__A, __B, __C);
34 }
35
36 __m128i test_mm_dpwusd_epi32(__m128i __A, __m128i __B, __m128i __C) {
37 // CHECK-LABEL: test_mm_dpwusd_epi32
38 // CHECK: call <4 x i32> @llvm.x86.avx2.vpdpwusd.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
39 return _mm_dpwusd_epi32(__A, __B, __C);
40 }
41
42 __m256i test_mm256_dpwusd_epi32(__m256i __A, __m256i __B, __m256i __C) {
43 // CHECK-LABEL: test_mm256_dpwusd_epi32
44 // CHECK: call <8 x i32> @llvm.x86.avx2.vpdpwusd.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
45 return _mm256_dpwusd_epi32(__A, __B, __C);
46 }
47
48 __m128i test_mm_dpwusds_epi32(__m128i __A, __m128i __B, __m128i __C) {
49 // CHECK-LABEL: test_mm_dpwusds_epi32
50 // CHECK: call <4 x i32> @llvm.x86.avx2.vpdpwusds.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
51 return _mm_dpwusds_epi32(__A, __B, __C);
52 }
53
54 __m256i test_mm256_dpwusds_epi32(__m256i __A, __m256i __B, __m256i __C) {
55 // CHECK-LABEL: test_mm256_dpwusds_epi32
56 // CHECK: call <8 x i32> @llvm.x86.avx2.vpdpwusds.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
57 return _mm256_dpwusds_epi32(__A, __B, __C);
58 }
59
60 __m128i test_mm_dpwuud_epi32(__m128i __A, __m128i __B, __m128i __C) {
61 // CHECK-LABEL: test_mm_dpwuud_epi32
62 // CHECK: call <4 x i32> @llvm.x86.avx2.vpdpwuud.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
63 return _mm_dpwuud_epi32(__A, __B, __C);
64 }
65
66 __m256i test_mm256_dpwuud_epi32(__m256i __A, __m256i __B, __m256i __C) {
67 // CHECK-LABEL: test_mm256_dpwuud_epi32
68 // CHECK: call <8 x i32> @llvm.x86.avx2.vpdpwuud.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
69 return _mm256_dpwuud_epi32(__A, __B, __C);
70 }
71
72 __m128i test_mm_dpwuuds_epi32(__m128i __A, __m128i __B, __m128i __C) {
73 // CHECK-LABEL: test_mm_dpwuuds_epi32
74 // CHECK: call <4 x i32> @llvm.x86.avx2.vpdpwuuds.128(<4 x i32> %{{.*}}, <8 x i16> %{{.*}}, <8 x i16> %{{.*}})
75 return _mm_dpwuuds_epi32(__A, __B, __C);
76 }
77
78 __m256i test_mm256_dpwuuds_epi32(__m256i __A, __m256i __B, __m256i __C) {
79 // CHECK-LABEL: test_mm256_dpwuuds_epi32
80 // CHECK: call <8 x i32> @llvm.x86.avx2.vpdpwuuds.256(<8 x i32> %{{.*}}, <16 x i16> %{{.*}}, <16 x i16> %{{.*}})
81 return _mm256_dpwuuds_epi32(__A, __B, __C);
82 }