Skip to content

Commit 94e2c19

Browse files
authored
[x86][AVX-VNNI] Fix VPDPBUSD Argument Types (#155194)
Fixed intrinsic VPDPBUSD[,S]_128/256/512's argument types to match with the ISA. Fixes part of #97271
1 parent 9465ef5 commit 94e2c19

21 files changed

+633
-570
lines changed

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,27 +1057,27 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
10571057
}
10581058

10591059
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1060-
def vpdpbusd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>, _Vector<4, int>)">;
1060+
def vpdpbusd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<16, unsigned char>, _Vector<16, char>)">;
10611061
}
10621062

10631063
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1064-
def vpdpbusd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>, _Vector<8, int>)">;
1064+
def vpdpbusd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<32, unsigned char>, _Vector<32, char>)">;
10651065
}
10661066

10671067
let Features = "avx512vnni", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1068-
def vpdpbusd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>)">;
1068+
def vpdpbusd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<64, unsigned char>, _Vector<64, char>)">;
10691069
}
10701070

10711071
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1072-
def vpdpbusds128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>, _Vector<4, int>)">;
1072+
def vpdpbusds128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<16, unsigned char>, _Vector<16, char>)">;
10731073
}
10741074

10751075
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1076-
def vpdpbusds256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>, _Vector<8, int>)">;
1076+
def vpdpbusds256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<32, unsigned char>, _Vector<32, char>)">;
10771077
}
10781078

10791079
let Features = "avx512vnni", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1080-
def vpdpbusds512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>)">;
1080+
def vpdpbusds512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<64, unsigned char>, _Vector<64, char>)">;
10811081
}
10821082

10831083
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {

clang/lib/Headers/avx512vlvnniintrin.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
/// ENDFOR
4242
/// DST[MAX:256] := 0
4343
/// \endcode
44-
#define _mm256_dpbusd_epi32(S, A, B) \
45-
((__m256i)__builtin_ia32_vpdpbusd256((__v8si)(S), (__v8si)(A), (__v8si)(B)))
44+
#define _mm256_dpbusd_epi32(S, A, B) \
45+
((__m256i)__builtin_ia32_vpdpbusd256((__v8si)(S), (__v32qu)(A), (__v32qi)(B)))
4646

4747
/// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a A with
4848
/// corresponding signed 8-bit integers in \a B, producing 4 intermediate signed
@@ -61,8 +61,9 @@
6161
/// ENDFOR
6262
/// DST[MAX:256] := 0
6363
/// \endcode
64-
#define _mm256_dpbusds_epi32(S, A, B) \
65-
((__m256i)__builtin_ia32_vpdpbusds256((__v8si)(S), (__v8si)(A), (__v8si)(B)))
64+
#define _mm256_dpbusds_epi32(S, A, B) \
65+
((__m256i)__builtin_ia32_vpdpbusds256((__v8si)(S), (__v32qu)(A), \
66+
(__v32qi)(B)))
6667

6768
/// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a A with
6869
/// corresponding 16-bit integers in \a B, producing 2 intermediate signed 32-bit
@@ -117,8 +118,8 @@
117118
/// ENDFOR
118119
/// DST[MAX:128] := 0
119120
/// \endcode
120-
#define _mm_dpbusd_epi32(S, A, B) \
121-
((__m128i)__builtin_ia32_vpdpbusd128((__v4si)(S), (__v4si)(A), (__v4si)(B)))
121+
#define _mm_dpbusd_epi32(S, A, B) \
122+
((__m128i)__builtin_ia32_vpdpbusd128((__v4si)(S), (__v16qu)(A), (__v16qi)(B)))
122123

123124
/// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a A with
124125
/// corresponding signed 8-bit integers in \a B, producing 4 intermediate signed
@@ -137,8 +138,9 @@
137138
/// ENDFOR
138139
/// DST[MAX:128] := 0
139140
/// \endcode
140-
#define _mm_dpbusds_epi32(S, A, B) \
141-
((__m128i)__builtin_ia32_vpdpbusds128((__v4si)(S), (__v4si)(A), (__v4si)(B)))
141+
#define _mm_dpbusds_epi32(S, A, B) \
142+
((__m128i)__builtin_ia32_vpdpbusds128((__v4si)(S), (__v16qu)(A), \
143+
(__v16qi)(B)))
142144

143145
/// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a A with
144146
/// corresponding 16-bit integers in \a B, producing 2 intermediate signed 32-bit

clang/lib/Headers/avx512vnniintrin.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
static __inline__ __m512i __DEFAULT_FN_ATTRS
2323
_mm512_dpbusd_epi32(__m512i __S, __m512i __A, __m512i __B)
2424
{
25-
return (__m512i)__builtin_ia32_vpdpbusd512((__v16si)__S, (__v16si)__A,
26-
(__v16si)__B);
25+
return (__m512i)__builtin_ia32_vpdpbusd512((__v16si)__S, (__v64qu)__A,
26+
(__v64qi)__B);
2727
}
2828

2929
static __inline__ __m512i __DEFAULT_FN_ATTRS
@@ -45,8 +45,8 @@ _mm512_maskz_dpbusd_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B)
4545
static __inline__ __m512i __DEFAULT_FN_ATTRS
4646
_mm512_dpbusds_epi32(__m512i __S, __m512i __A, __m512i __B)
4747
{
48-
return (__m512i)__builtin_ia32_vpdpbusds512((__v16si)__S, (__v16si)__A,
49-
(__v16si)__B);
48+
return (__m512i)__builtin_ia32_vpdpbusds512((__v16si)__S, (__v64qu)__A,
49+
(__v64qi)__B);
5050
}
5151

5252
static __inline__ __m512i __DEFAULT_FN_ATTRS

clang/lib/Headers/avxvnniintrin.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
static __inline__ __m256i __DEFAULT_FN_ATTRS256
6464
_mm256_dpbusd_avx_epi32(__m256i __S, __m256i __A, __m256i __B)
6565
{
66-
return (__m256i)__builtin_ia32_vpdpbusd256((__v8si)__S, (__v8si)__A, (__v8si)__B);
66+
return (__m256i)__builtin_ia32_vpdpbusd256((__v8si)__S, (__v32qu)__A,
67+
(__v32qi)__B);
6768
}
6869

6970
/// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a __A with
@@ -86,7 +87,8 @@ _mm256_dpbusd_avx_epi32(__m256i __S, __m256i __A, __m256i __B)
8687
static __inline__ __m256i __DEFAULT_FN_ATTRS256
8788
_mm256_dpbusds_avx_epi32(__m256i __S, __m256i __A, __m256i __B)
8889
{
89-
return (__m256i)__builtin_ia32_vpdpbusds256((__v8si)__S, (__v8si)__A, (__v8si)__B);
90+
return (__m256i)__builtin_ia32_vpdpbusds256((__v8si)__S, (__v32qu)__A,
91+
(__v32qi)__B);
9092
}
9193

9294
/// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a __A with
@@ -151,7 +153,8 @@ _mm256_dpwssds_avx_epi32(__m256i __S, __m256i __A, __m256i __B)
151153
static __inline__ __m128i __DEFAULT_FN_ATTRS128
152154
_mm_dpbusd_avx_epi32(__m128i __S, __m128i __A, __m128i __B)
153155
{
154-
return (__m128i)__builtin_ia32_vpdpbusd128((__v4si)__S, (__v4si)__A, (__v4si)__B);
156+
return (__m128i)__builtin_ia32_vpdpbusd128((__v4si)__S, (__v16qu)__A,
157+
(__v16qi)__B);
155158
}
156159

157160
/// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in \a __A with
@@ -174,7 +177,8 @@ _mm_dpbusd_avx_epi32(__m128i __S, __m128i __A, __m128i __B)
174177
static __inline__ __m128i __DEFAULT_FN_ATTRS128
175178
_mm_dpbusds_avx_epi32(__m128i __S, __m128i __A, __m128i __B)
176179
{
177-
return (__m128i)__builtin_ia32_vpdpbusds128((__v4si)__S, (__v4si)__A, (__v4si)__B);
180+
return (__m128i)__builtin_ia32_vpdpbusds128((__v4si)__S, (__v16qu)__A,
181+
(__v16qi)__B);
178182
}
179183

180184
/// Multiply groups of 2 adjacent pairs of signed 16-bit integers in \a __A with

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,41 @@
77

88
__m256i test_mm256_mask_dpbusd_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
99
// CHECK-LABEL: test_mm256_mask_dpbusd_epi32
10-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
10+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
1111
// CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}
1212
return _mm256_mask_dpbusd_epi32(__S, __U, __A, __B);
1313
}
1414

1515
__m256i test_mm256_maskz_dpbusd_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) {
1616
// CHECK-LABEL: test_mm256_maskz_dpbusd_epi32
17-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
17+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
1818
// CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}
1919
return _mm256_maskz_dpbusd_epi32(__U, __S, __A, __B);
2020
}
2121

2222
__m256i test_mm256_dpbusd_epi32(__m256i __S, __m256i __A, __m256i __B) {
2323
// CHECK-LABEL: test_mm256_dpbusd_epi32
24-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
24+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
2525
return _mm256_dpbusd_epi32(__S, __A, __B);
2626
}
2727

2828
__m256i test_mm256_mask_dpbusds_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
2929
// CHECK-LABEL: test_mm256_mask_dpbusds_epi32
30-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
30+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
3131
// CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}
3232
return _mm256_mask_dpbusds_epi32(__S, __U, __A, __B);
3333
}
3434

3535
__m256i test_mm256_maskz_dpbusds_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B) {
3636
// CHECK-LABEL: test_mm256_maskz_dpbusds_epi32
37-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
37+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
3838
// CHECK: select <8 x i1> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}}
3939
return _mm256_maskz_dpbusds_epi32(__U, __S, __A, __B);
4040
}
4141

4242
__m256i test_mm256_dpbusds_epi32(__m256i __S, __m256i __A, __m256i __B) {
4343
// CHECK-LABEL: test_mm256_dpbusds_epi32
44-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
44+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
4545
return _mm256_dpbusds_epi32(__S, __A, __B);
4646
}
4747

@@ -87,41 +87,41 @@ __m256i test_mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B) {
8787

8888
__m128i test_mm_mask_dpbusd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
8989
// CHECK-LABEL: test_mm_mask_dpbusd_epi32
90-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
90+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
9191
// CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}
9292
return _mm_mask_dpbusd_epi32(__S, __U, __A, __B);
9393
}
9494

9595
__m128i test_mm_maskz_dpbusd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
9696
// CHECK-LABEL: test_mm_maskz_dpbusd_epi32
97-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
97+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
9898
// CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}
9999
return _mm_maskz_dpbusd_epi32(__U, __S, __A, __B);
100100
}
101101

102102
__m128i test_mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) {
103103
// CHECK-LABEL: test_mm_dpbusd_epi32
104-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
104+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
105105
return _mm_dpbusd_epi32(__S, __A, __B);
106106
}
107107

108108
__m128i test_mm_mask_dpbusds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
109109
// CHECK-LABEL: test_mm_mask_dpbusds_epi32
110-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
110+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
111111
// CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}
112112
return _mm_mask_dpbusds_epi32(__S, __U, __A, __B);
113113
}
114114

115115
__m128i test_mm_maskz_dpbusds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
116116
// CHECK-LABEL: test_mm_maskz_dpbusds_epi32
117-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
117+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
118118
// CHECK: select <4 x i1> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}}
119119
return _mm_maskz_dpbusds_epi32(__U, __S, __A, __B);
120120
}
121121

122122
__m128i test_mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) {
123123
// CHECK-LABEL: test_mm_dpbusds_epi32
124-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
124+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
125125
return _mm_dpbusds_epi32(__S, __A, __B);
126126
}
127127

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,41 @@
77

88
__m512i test_mm512_mask_dpbusd_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B) {
99
// CHECK-LABEL: test_mm512_mask_dpbusd_epi32
10-
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusd.512(<16 x i32> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}})
10+
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusd.512(<16 x i32> %{{.*}}, <64 x i8> %{{.*}}, <64 x i8> %{{.*}})
1111
// CHECK: select <16 x i1> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}}
1212
return _mm512_mask_dpbusd_epi32(__S, __U, __A, __B);
1313
}
1414

1515
__m512i test_mm512_maskz_dpbusd_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B) {
1616
// CHECK-LABEL: test_mm512_maskz_dpbusd_epi32
17-
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusd.512(<16 x i32> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}})
17+
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusd.512(<16 x i32> %{{.*}}, <64 x i8> %{{.*}}, <64 x i8> %{{.*}})
1818
// CHECK: select <16 x i1> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}}
1919
return _mm512_maskz_dpbusd_epi32(__U, __S, __A, __B);
2020
}
2121

2222
__m512i test_mm512_dpbusd_epi32(__m512i __S, __m512i __A, __m512i __B) {
2323
// CHECK-LABEL: test_mm512_dpbusd_epi32
24-
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusd.512(<16 x i32> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}})
24+
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusd.512(<16 x i32> %{{.*}}, <64 x i8> %{{.*}}, <64 x i8> %{{.*}})
2525
return _mm512_dpbusd_epi32(__S, __A, __B);
2626
}
2727

2828
__m512i test_mm512_mask_dpbusds_epi32(__m512i __S, __mmask16 __U, __m512i __A, __m512i __B) {
2929
// CHECK-LABEL: test_mm512_mask_dpbusds_epi32
30-
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusds.512(<16 x i32> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}})
30+
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusds.512(<16 x i32> %{{.*}}, <64 x i8> %{{.*}}, <64 x i8> %{{.*}})
3131
// CHECK: select <16 x i1> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}}
3232
return _mm512_mask_dpbusds_epi32(__S, __U, __A, __B);
3333
}
3434

3535
__m512i test_mm512_maskz_dpbusds_epi32(__mmask16 __U, __m512i __S, __m512i __A, __m512i __B) {
3636
// CHECK-LABEL: test_mm512_maskz_dpbusds_epi32
37-
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusds.512(<16 x i32> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}})
37+
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusds.512(<16 x i32> %{{.*}}, <64 x i8> %{{.*}}, <64 x i8> %{{.*}})
3838
// CHECK: select <16 x i1> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}}
3939
return _mm512_maskz_dpbusds_epi32(__U, __S, __A, __B);
4040
}
4141

4242
__m512i test_mm512_dpbusds_epi32(__m512i __S, __m512i __A, __m512i __B) {
4343
// CHECK-LABEL: test_mm512_dpbusds_epi32
44-
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusds.512(<16 x i32> %{{.*}}, <16 x i32> %{{.*}}, <16 x i32> %{{.*}})
44+
// CHECK: call <16 x i32> @llvm.x86.avx512.vpdpbusds.512(<16 x i32> %{{.*}}, <64 x i8> %{{.*}}, <64 x i8> %{{.*}})
4545
return _mm512_dpbusds_epi32(__S, __A, __B);
4646
}
4747

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
__m256i test_mm256_dpbusd_epi32(__m256i __S, __m256i __A, __m256i __B) {
99
// CHECK-LABEL: test_mm256_dpbusd_epi32
10-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
10+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
1111
return _mm256_dpbusd_epi32(__S, __A, __B);
1212
}
1313

1414
__m256i test_mm256_dpbusds_epi32(__m256i __S, __m256i __A, __m256i __B) {
1515
// CHECK-LABEL: test_mm256_dpbusds_epi32
16-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
16+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
1717
return _mm256_dpbusds_epi32(__S, __A, __B);
1818
}
1919

@@ -31,13 +31,13 @@ __m256i test_mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B) {
3131

3232
__m128i test_mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) {
3333
// CHECK-LABEL: test_mm_dpbusd_epi32
34-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
34+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
3535
return _mm_dpbusd_epi32(__S, __A, __B);
3636
}
3737

3838
__m128i test_mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) {
3939
// CHECK-LABEL: test_mm_dpbusds_epi32
40-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
40+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
4141
return _mm_dpbusds_epi32(__S, __A, __B);
4242
}
4343

@@ -55,13 +55,13 @@ __m128i test_mm_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B) {
5555

5656
__m256i test_mm256_dpbusd_avx_epi32(__m256i __S, __m256i __A, __m256i __B) {
5757
// CHECK-LABEL: test_mm256_dpbusd_avx_epi32
58-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
58+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusd.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
5959
return _mm256_dpbusd_avx_epi32(__S, __A, __B);
6060
}
6161

6262
__m256i test_mm256_dpbusds_avx_epi32(__m256i __S, __m256i __A, __m256i __B) {
6363
// CHECK-LABEL: test_mm256_dpbusds_avx_epi32
64-
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> %{{.*}})
64+
// CHECK: call <8 x i32> @llvm.x86.avx512.vpdpbusds.256(<8 x i32> %{{.*}}, <32 x i8> %{{.*}}, <32 x i8> %{{.*}})
6565
return _mm256_dpbusds_avx_epi32(__S, __A, __B);
6666
}
6767

@@ -79,13 +79,13 @@ __m256i test_mm256_dpwssds_avx_epi32(__m256i __S, __m256i __A, __m256i __B) {
7979

8080
__m128i test_mm_dpbusd_avx_epi32(__m128i __S, __m128i __A, __m128i __B) {
8181
// CHECK-LABEL: test_mm_dpbusd_avx_epi32
82-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
82+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusd.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
8383
return _mm_dpbusd_avx_epi32(__S, __A, __B);
8484
}
8585

8686
__m128i test_mm_dpbusds_avx_epi32(__m128i __S, __m128i __A, __m128i __B) {
8787
// CHECK-LABEL: test_mm_dpbusds_avx_epi32
88-
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> %{{.*}})
88+
// CHECK: call <4 x i32> @llvm.x86.avx512.vpdpbusds.128(<4 x i32> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
8989
return _mm_dpbusds_avx_epi32(__S, __A, __B);
9090
}
9191

0 commit comments

Comments
 (0)