@@ -124,13 +124,16 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
124124 def Op#d128 : X86Builtin<" _Vector<4, int>(_Vector<4, int>, _Vector<4, int>)" >;
125125 }
126126
127- def pmaddubsw128 : X86Builtin<" _Vector<8, short>(_Vector<16, char>, _Vector<16, char>)" >;
128127 def pmulhrsw128 : X86Builtin<" _Vector<8, short>(_Vector<8, short>, _Vector<8, short>)" >;
129128 def pshufb128 : X86Builtin<" _Vector<16, char>(_Vector<16, char>, _Vector<16, char>)" >;
130129 def psignb128 : X86Builtin<" _Vector<16, char>(_Vector<16, char>, _Vector<16, char>)" >;
131130 def psignw128 : X86Builtin<" _Vector<8, short>(_Vector<8, short>, _Vector<8, short>)" >;
132131 def psignd128 : X86Builtin<" _Vector<4, int>(_Vector<4, int>, _Vector<4, int>)" >;
133132 }
133+
134+ let Features = " ssse3" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128 >] in {
135+ def pmaddubsw128 : X86Builtin<" _Vector<8, short>(_Vector<16, char>, _Vector<16, char>)" >;
136+ }
134137}
135138
136139// AVX
@@ -276,13 +279,14 @@ let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] i
276279 def psllw128 : X86Builtin<" _Vector<8, short>(_Vector<8, short>, _Vector<8, short>)" >;
277280 def pslld128 : X86Builtin<" _Vector<4, int>(_Vector<4, int>, _Vector<4, int>)" >;
278281 def psllq128 : X86Builtin<" _Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)" >;
279- def pmaddwd128 : X86Builtin<" _Vector<4, int>(_Vector<8, short>, _Vector<8, short>)" >;
280282 def pslldqi128_byteshift : X86Builtin<" _Vector<16, char>(_Vector<16, char>, _Constant int)" >;
281283 def psrldqi128_byteshift : X86Builtin<" _Vector<16, char>(_Vector<16, char>, _Constant int)" >;
282284}
283285
284286let Features = " sse2" ,
285287 Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128 >] in {
288+ def pmaddwd128 : X86Builtin<" _Vector<4, int>(_Vector<8, short>, _Vector<8, short>)" >;
289+
286290 def pmuludq128 : X86Builtin<" _Vector<2, long long int>(_Vector<4, int>, _Vector<4, int>)" >;
287291
288292 def psllwi128 : X86Builtin<" _Vector<8, short>(_Vector<8, short>, int)" >;
@@ -578,8 +582,6 @@ let Features = "avx2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] i
578582 def phsubw256 : X86Builtin<" _Vector<16, short>(_Vector<16, short>, _Vector<16, short>)" >;
579583 def phsubd256 : X86Builtin<" _Vector<8, int>(_Vector<8, int>, _Vector<8, int>)" >;
580584 def phsubsw256 : X86Builtin<" _Vector<16, short>(_Vector<16, short>, _Vector<16, short>)" >;
581- def pmaddubsw256 : X86Builtin<" _Vector<16, short>(_Vector<32, char>, _Vector<32, char>)" >;
582- def pmaddwd256 : X86Builtin<" _Vector<8, int>(_Vector<16, short>, _Vector<16, short>)" >;
583585 def pmovmskb256 : X86Builtin<" int(_Vector<32, char>)" >;
584586 def pmulhrsw256 : X86Builtin<" _Vector<16, short>(_Vector<16, short>, _Vector<16, short>)" >;
585587 def psadbw256 : X86Builtin<" _Vector<4, long long int>(_Vector<32, char>, _Vector<32, char>)" >;
@@ -619,6 +621,9 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
619621
620622 def pblendvb256 : X86Builtin<" _Vector<32, char>(_Vector<32, char>, _Vector<32, char>, _Vector<32, char>)" >;
621623
624+ def pmaddubsw256 : X86Builtin<" _Vector<16, short>(_Vector<32, char>, _Vector<32, char>)" >;
625+ def pmaddwd256 : X86Builtin<" _Vector<8, int>(_Vector<16, short>, _Vector<16, short>)" >;
626+
622627 def pmuldq256 : X86Builtin<" _Vector<4, long long int>(_Vector<8, int>, _Vector<8, int>)" >;
623628 def pmuludq256 : X86Builtin<" _Vector<4, long long int>(_Vector<8, int>, _Vector<8, int>)" >;
624629
@@ -1373,10 +1378,6 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
13731378 def subps512 : X86Builtin<" _Vector<16, float>(_Vector<16, float>, _Vector<16, float>, _Constant int)" >;
13741379}
13751380
1376- let Features = " avx512bw" , Attributes = [NoThrow, Const, RequiredVectorWidth<512 >] in {
1377- def pmaddubsw512 : X86Builtin<" _Vector<32, short>(_Vector<64, char>, _Vector<64, char>)" >;
1378- def pmaddwd512 : X86Builtin<" _Vector<16, int>(_Vector<32, short>, _Vector<32, short>)" >;
1379- }
13801381
13811382let Features = " avx512f" , Attributes = [NoThrow, Const, RequiredVectorWidth<128 >] in {
13821383 def addss_round_mask : X86Builtin<" _Vector<4, float>(_Vector<4, float>, _Vector<4, float>, _Vector<4, float>, unsigned char, _Constant int)" >;
@@ -1996,6 +1997,8 @@ let Features = "avx512bw", Attributes = [NoThrow, Const, RequiredVectorWidth<512
19961997}
19971998
19981999let Features = " avx512bw" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512 >] in {
2000+ def pmaddubsw512 : X86Builtin<" _Vector<32, short>(_Vector<64, char>, _Vector<64, char>)" >;
2001+ def pmaddwd512 : X86Builtin<" _Vector<16, int>(_Vector<32, short>, _Vector<32, short>)" >;
19992002 def psllv32hi : X86Builtin<" _Vector<32, short>(_Vector<32, short>, _Vector<32, short>)" >;
20002003}
20012004
0 commit comments