@@ -93,9 +93,6 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
9393 }
9494
9595 let Features = " sse2" in {
96- def packsswb128 : X86Builtin<" _Vector<16, char>(_Vector<8, short>, _Vector<8, short>)" >;
97- def packssdw128 : X86Builtin<" _Vector<8, short>(_Vector<4, int>, _Vector<4, int>)" >;
98- def packuswb128 : X86Builtin<" _Vector<16, char>(_Vector<8, short>, _Vector<8, short>)" >;
9996 def vec_ext_v2di : X86Builtin<" long long int(_Vector<2, long long int>, _Constant int)" >;
10097 def vec_ext_v4si : X86Builtin<" int(_Vector<4, int>, _Constant int)" >;
10198 def vec_ext_v4sf : X86Builtin<" float(_Vector<4, float>, _Constant int)" >;
@@ -108,6 +105,9 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
108105 def pavgw128 : X86Builtin<" _Vector<8, unsigned short>(_Vector<8, unsigned short>, _Vector<8, unsigned short>)" >;
109106 def pmulhw128 : X86Builtin<" _Vector<8, short>(_Vector<8, short>, _Vector<8, short>)" >;
110107 def pmulhuw128 : X86Builtin<" _Vector<8, unsigned short>(_Vector<8, unsigned short>, _Vector<8, unsigned short>)" >;
108+ def packsswb128 : X86Builtin<" _Vector<16, char>(_Vector<8, short>, _Vector<8, short>)" >;
109+ def packssdw128 : X86Builtin<" _Vector<8, short>(_Vector<4, int>, _Vector<4, int>)" >;
110+ def packuswb128 : X86Builtin<" _Vector<16, char>(_Vector<8, short>, _Vector<8, short>)" >;
111111 }
112112
113113 let Features = " sse3" in {
@@ -312,7 +312,6 @@ let Features = "ssse3", Attributes = [NoThrow, Const, RequiredVectorWidth<128>]
312312
313313let Features = " sse4.1" , Attributes = [NoThrow, Const, RequiredVectorWidth<128 >] in {
314314 def insertps128 : X86Builtin<" _Vector<4, float>(_Vector<4, float>, _Vector<4, float>, _Constant char)" >;
315- def packusdw128 : X86Builtin<" _Vector<8, short>(_Vector<4, int>, _Vector<4, int>)" >;
316315 def roundps : X86Builtin<" _Vector<4, float>(_Vector<4, float>, _Constant int)" >;
317316 def roundss : X86Builtin<" _Vector<4, float>(_Vector<4, float>, _Vector<4, float>, _Constant int)" >;
318317 def roundsd : X86Builtin<" _Vector<2, double>(_Vector<2, double>, _Vector<2, double>, _Constant int)" >;
@@ -338,6 +337,7 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVector
338337 def pblendvb128 : X86Builtin<" _Vector<16, char>(_Vector<16, char>, _Vector<16, char>, _Vector<16, char>)" >;
339338
340339 def pmuldq128 : X86Builtin<" _Vector<2, long long int>(_Vector<4, int>, _Vector<4, int>)" >;
340+ def packusdw128 : X86Builtin<" _Vector<8, short>(_Vector<4, int>, _Vector<4, int>)" >;
341341}
342342
343343let Features = " sse4.2" , Attributes = [NoThrow, Const, RequiredVectorWidth<128 >] in {
@@ -571,10 +571,6 @@ let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in
571571
572572let Features = " avx2" , Attributes = [NoThrow, Const, RequiredVectorWidth<256 >] in {
573573 def mpsadbw256 : X86Builtin<" _Vector<32, char>(_Vector<32, char>, _Vector<32, char>, _Constant char)" >;
574- def packsswb256 : X86Builtin<" _Vector<32, char>(_Vector<16, short>, _Vector<16, short>)" >;
575- def packssdw256 : X86Builtin<" _Vector<16, short>(_Vector<8, int>, _Vector<8, int>)" >;
576- def packuswb256 : X86Builtin<" _Vector<32, char>(_Vector<16, short>, _Vector<16, short>)" >;
577- def packusdw256 : X86Builtin<" _Vector<16, short>(_Vector<8, int>, _Vector<8, int>)" >;
578574 def palignr256 : X86Builtin<" _Vector<32, char>(_Vector<32, char>, _Vector<32, char>, _Constant int)" >;
579575 def phaddw256 : X86Builtin<" _Vector<16, short>(_Vector<16, short>, _Vector<16, short>)" >;
580576 def phaddd256 : X86Builtin<" _Vector<8, int>(_Vector<8, int>, _Vector<8, int>)" >;
@@ -647,6 +643,10 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
647643 def psrlv4di : X86Builtin<" _Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>)" >;
648644
649645 def insert128i256 : X86Builtin<" _Vector<4, long long int>(_Vector<4, long long int>, _Vector<2, long long int>, _Constant int)" >;
646+ def packusdw256 : X86Builtin<" _Vector<16, short>(_Vector<8, int>, _Vector<8, int>)" >;
647+ def packsswb256 : X86Builtin<" _Vector<32, char>(_Vector<16, short>, _Vector<16, short>)" >;
648+ def packssdw256 : X86Builtin<" _Vector<16, short>(_Vector<8, int>, _Vector<8, int>)" >;
649+ def packuswb256 : X86Builtin<" _Vector<32, char>(_Vector<16, short>, _Vector<16, short>)" >;
650650}
651651
652652let Features = " avx2" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128 >] in {
@@ -1308,11 +1308,14 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
13081308
13091309let Features = " avx512bw" , Attributes = [NoThrow, Const, RequiredVectorWidth<512 >] in {
13101310 def ucmpw512_mask : X86Builtin<" unsigned int(_Vector<32, short>, _Vector<32, short>, _Constant int, unsigned int)" >;
1311- def packssdw512 : X86Builtin<" _Vector<32, short>(_Vector<16, int>, _Vector<16, int>)" >;
1311+ def pshufb512 : X86Builtin<" _Vector<64, char>(_Vector<64, char>, _Vector<64, char>)" >;
1312+ }
1313+
1314+ let Features = " avx512bw" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512 >] in {
13121315 def packsswb512 : X86Builtin<" _Vector<64, char>(_Vector<32, short>, _Vector<32, short>)" >;
1313- def packusdw512 : X86Builtin<" _Vector<32, short>(_Vector<16, int>, _Vector<16, int>)" >;
1316+ def packssdw512 : X86Builtin<" _Vector<32, short>(_Vector<16, int>, _Vector<16, int>)" >;
13141317 def packuswb512 : X86Builtin<" _Vector<64, char>(_Vector<32, short>, _Vector<32, short>)" >;
1315- def pshufb512 : X86Builtin<" _Vector<64, char >(_Vector<64, char >, _Vector<64, char >)" >;
1318+ def packusdw512 : X86Builtin<" _Vector<32, short >(_Vector<16, int >, _Vector<16, int >)" >;
13161319}
13171320
13181321let Features = " avx512cd,avx512vl" , Attributes = [NoThrow, Const, RequiredVectorWidth<128 >] in {
0 commit comments