@@ -185,7 +185,8 @@ let Features = "sse", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in
185185 def cvttss2si : X86Builtin<" int(_Vector<4, float>)" >;
186186}
187187
188- let Features = " sse" , Attributes = [NoThrow, RequiredVectorWidth<128 >] in {
188+ let Features = " sse" ,
189+ Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128 >] in {
189190 def movmskps : X86Builtin<" int(_Vector<4, float>)" >;
190191}
191192
@@ -211,11 +212,6 @@ let Features = "sse2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
211212 def maskmovdqu : X86Builtin<" void(_Vector<16, char>, _Vector<16, char>, char *)" >;
212213}
213214
214- let Features = " sse2" , Attributes = [NoThrow, Const, RequiredVectorWidth<128 >] in {
215- def movmskpd : X86Builtin<" int(_Vector<2, double>)" >;
216- def pmovmskb128 : X86Builtin<" int(_Vector<16, char>)" >;
217- }
218-
219215let Features = " sse2" , Attributes = [NoThrow] in {
220216 def movnti : X86Builtin<" void(int *, int)" >;
221217}
@@ -224,6 +220,8 @@ let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
224220 def pshuflw : X86Builtin<" _Vector<8, short>(_Vector<8, short>, _Constant int)" >;
225221 def pshufd : X86Builtin<" _Vector<4, int>(_Vector<4, int>, _Constant int)" >;
226222 def pshufhw : X86Builtin<" _Vector<8, short>(_Vector<8, short>, _Constant int)" >;
223+ def movmskpd : X86Builtin<" int(_Vector<2, double>)" >;
224+ def pmovmskb128 : X86Builtin<" int(_Vector<16, char>)" >;
227225}
228226
229227let Features = " sse2" , Attributes = [NoThrow, Const, RequiredVectorWidth<128 >] in {
@@ -334,8 +332,8 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, RequiredVectorWidth<128>]
334332 def dpps : X86Builtin<" _Vector<4, float>(_Vector<4, float>, _Vector<4, float>, _Constant char)" >;
335333 def dppd : X86Builtin<" _Vector<2, double>(_Vector<2, double>, "
336334 " _Vector<2,double>, _Constant char)" >;
337- def mpsadbw128 : X86Builtin<" _Vector<16, char>(_Vector<16, char>, _Vector<16, char>, _Constant char) " >;
338- def phminposuw128 : X86Builtin< " _Vector<8, short>(_Vector<8, short> )" >;
335+ def mpsadbw128 : X86Builtin<" _Vector<16, char>(_Vector<16, char>, "
336+ " _Vector<16, char>, _Constant char )" >;
339337}
340338
341339let Features = " sse4.1" ,
@@ -358,6 +356,7 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVector
358356
359357 def pmuldq128 : X86Builtin<" _Vector<2, long long int>(_Vector<4, int>, _Vector<4, int>)" >;
360358 def packusdw128 : X86Builtin<" _Vector<8, short>(_Vector<4, int>, _Vector<4, int>)" >;
359+ def phminposuw128 : X86Builtin<" _Vector<8, short>(_Vector<8, short>)" >;
361360
362361 def vec_ext_v16qi : X86Builtin<" char(_Vector<16, char>, _Constant int)" >;
363362 def vec_set_v16qi : X86Builtin<" _Vector<16, char>(_Vector<16, char>, char, _Constant int)" >;
@@ -498,9 +497,6 @@ let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in
498497 def dpps256 : X86Builtin<" _Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Constant char)" >;
499498 def cmppd256 : X86Builtin<" _Vector<4, double>(_Vector<4, double>, _Vector<4, double>, _Constant char)" >;
500499 def cmpps256 : X86Builtin<" _Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Constant char)" >;
501- def vextractf128_pd256 : X86Builtin<" _Vector<2, double>(_Vector<4, double>, _Constant int)" >;
502- def vextractf128_ps256 : X86Builtin<" _Vector<4, float>(_Vector<8, float>, _Constant int)" >;
503- def vextractf128_si256 : X86Builtin<" _Vector<4, int>(_Vector<8, int>, _Constant int)" >;
504500 def cvtpd2ps256 : X86Builtin<" _Vector<4, float>(_Vector<4, double>)" >;
505501 def cvtps2dq256 : X86Builtin<" _Vector<8, int>(_Vector<8, float>)" >;
506502 def cvttpd2dq256 : X86Builtin<" _Vector<4, int>(_Vector<4, double>)" >;
@@ -521,6 +517,9 @@ let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWid
521517 def blendps256 : X86Builtin<" _Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Constant int)" >;
522518 def blendvpd256 : X86Builtin<" _Vector<4, double>(_Vector<4, double>, _Vector<4, double>, _Vector<4, double>)" >;
523519 def blendvps256 : X86Builtin<" _Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Vector<8, float>)" >;
520+ def vextractf128_pd256 : X86Builtin<" _Vector<2, double>(_Vector<4, double>, _Constant int)" >;
521+ def vextractf128_ps256 : X86Builtin<" _Vector<4, float>(_Vector<8, float>, _Constant int)" >;
522+ def vextractf128_si256 : X86Builtin<" _Vector<4, int>(_Vector<8, int>, _Constant int)" >;
524523 def vinsertf128_pd256 : X86Builtin<" _Vector<4, double>(_Vector<4, double>, _Vector<2, double>, _Constant int)" >;
525524 def vinsertf128_ps256 : X86Builtin<" _Vector<8, float>(_Vector<8, float>, _Vector<4, float>, _Constant int)" >;
526525 def vinsertf128_si256 : X86Builtin<" _Vector<8, int>(_Vector<8, int>, _Vector<4, int>, _Constant int)" >;
@@ -562,11 +561,8 @@ let Features = "avx",
562561 def vtestnzcps256 : X86Builtin<" int(_Vector<8, float>, _Vector<8, float>)" >;
563562 def ptestz256 : X86Builtin<" int(_Vector<4, long long int>, _Vector<4, long long int>)" >;
564563 def ptestc256 : X86Builtin<" int(_Vector<4, long long int>, _Vector<4, long long int>)" >;
565- def ptestnzc256 : X86Builtin<" int(_Vector<4, long long int>, _Vector<4, long long int>)" >;
566- }
567-
568- let Features = " avx" ,
569- Attributes = [NoThrow, Const, RequiredVectorWidth<256 >] in {
564+ def ptestnzc256
565+ : X86Builtin<" int(_Vector<4, long long int>, _Vector<4, long long int>)" >;
570566 def movmskpd256 : X86Builtin<" int(_Vector<4, double>)" >;
571567 def movmskps256 : X86Builtin<" int(_Vector<8, float>)" >;
572568}
@@ -605,9 +601,8 @@ let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWid
605601
606602let Features = " avx2" , Attributes = [NoThrow, Const, RequiredVectorWidth<256 >] in {
607603 def mpsadbw256 : X86Builtin<" _Vector<32, char>(_Vector<32, char>, _Vector<32, char>, _Constant char)" >;
608- def palignr256 : X86Builtin<" _Vector<32, char>(_Vector<32, char>, _Vector<32, char>, _Constant int)" >;
609-
610- def pmovmskb256 : X86Builtin<" int(_Vector<32, char>)" >;
604+ def palignr256 : X86Builtin<" _Vector<32, char>(_Vector<32, char>, "
605+ " _Vector<32, char>, _Constant int)" >;
611606 def psadbw256 : X86Builtin<" _Vector<4, long long int>(_Vector<32, char>, _Vector<32, char>)" >;
612607 def psignb256 : X86Builtin<" _Vector<32, char>(_Vector<32, char>, _Vector<32, char>)" >;
613608 def psignw256 : X86Builtin<" _Vector<16, short>(_Vector<16, short>, _Vector<16, short>)" >;
@@ -627,11 +622,11 @@ let Features = "avx2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] i
627622 def permvarsf256 : X86Builtin<" _Vector<8, float>(_Vector<8, float>, _Vector<8, int>)" >;
628623 def permti256 : X86Builtin<" _Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>, _Constant int)" >;
629624 def permdi256 : X86Builtin<" _Vector<4, long long int>(_Vector<4, long long int>, _Constant int)" >;
630- def extract128i256 : X86Builtin<" _Vector<2, long long int>(_Vector<4, long long int>, _Constant int)" >;
631625}
632626
633627
634628let Features = " avx2" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256 >] in {
629+ def pmovmskb256 : X86Builtin<" int(_Vector<32, char>)" >;
635630 def pavgb256 : X86Builtin<" _Vector<32, unsigned char>(_Vector<32, unsigned char>, _Vector<32, unsigned char>)" >;
636631 def pavgw256 : X86Builtin<" _Vector<16, unsigned short>(_Vector<16, unsigned short>, _Vector<16, unsigned short>)" >;
637632
@@ -694,6 +689,7 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
694689 def psrlv4si : X86Builtin<" _Vector<4, int>(_Vector<4, int>, _Vector<4, int>)" >;
695690 def psllv2di : X86Builtin<" _Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)" >;
696691 def psrlv2di : X86Builtin<" _Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)" >;
692+ def extract128i256 : X86Builtin<" _Vector<2, long long int>(_Vector<4, long long int>, _Constant int)" >;
697693}
698694
699695let Features = " avx2" , Attributes = [NoThrow, RequiredVectorWidth<256 >] in {
@@ -1095,7 +1091,7 @@ let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256
10951091 def alignq256 : X86Builtin<" _Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>, _Constant int)" >;
10961092}
10971093
1098- let Features = " avx512f" , Attributes = [NoThrow, Const, RequiredVectorWidth<512 >] in {
1094+ let Features = " avx512f" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512 >] in {
10991095 def extractf64x4_mask : X86Builtin<" _Vector<4, double>(_Vector<8, double>, _Constant int, _Vector<4, double>, unsigned char)" >;
11001096 def extractf32x4_mask : X86Builtin<" _Vector<4, float>(_Vector<16, float>, _Constant int, _Vector<4, float>, unsigned char)" >;
11011097}
@@ -2960,24 +2956,24 @@ let Features = "avx512vl", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
29602956 def pmovqw256mem_mask : X86Builtin<" void(_Vector<8, short *>, _Vector<4, long long int>, unsigned char)" >;
29612957}
29622958
2963- let Features = " avx512dq" , Attributes = [NoThrow, Const, RequiredVectorWidth<512 >] in {
2959+ let Features = " avx512dq" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512 >] in {
29642960 def extractf32x8_mask : X86Builtin<" _Vector<8, float>(_Vector<16, float>, _Constant int, _Vector<8, float>, unsigned char)" >;
29652961 def extractf64x2_512_mask : X86Builtin<" _Vector<2, double>(_Vector<8, double>, _Constant int, _Vector<2, double>, unsigned char)" >;
29662962 def extracti32x8_mask : X86Builtin<" _Vector<8, int>(_Vector<16, int>, _Constant int, _Vector<8, int>, unsigned char)" >;
29672963 def extracti64x2_512_mask : X86Builtin<" _Vector<2, long long int>(_Vector<8, long long int>, _Constant int, _Vector<2, long long int>, unsigned char)" >;
29682964}
29692965
2970- let Features = " avx512f" , Attributes = [NoThrow, Const, RequiredVectorWidth<512 >] in {
2966+ let Features = " avx512f" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512 >] in {
29712967 def extracti32x4_mask : X86Builtin<" _Vector<4, int>(_Vector<16, int>, _Constant int, _Vector<4, int>, unsigned char)" >;
29722968 def extracti64x4_mask : X86Builtin<" _Vector<4, long long int>(_Vector<8, long long int>, _Constant int, _Vector<4, long long int>, unsigned char)" >;
29732969}
29742970
2975- let Features = " avx512dq,avx512vl" , Attributes = [NoThrow, Const, RequiredVectorWidth<256 >] in {
2971+ let Features = " avx512dq,avx512vl" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256 >] in {
29762972 def extractf64x2_256_mask : X86Builtin<" _Vector<2, double>(_Vector<4, double>, _Constant int, _Vector<2, double>, unsigned char)" >;
29772973 def extracti64x2_256_mask : X86Builtin<" _Vector<2, long long int>(_Vector<4, long long int>, _Constant int, _Vector<2, long long int>, unsigned char)" >;
29782974}
29792975
2980- let Features = " avx512vl" , Attributes = [NoThrow, Const, RequiredVectorWidth<256 >] in {
2976+ let Features = " avx512vl" , Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256 >] in {
29812977 def extractf32x4_256_mask : X86Builtin<" _Vector<4, float>(_Vector<8, float>, _Constant int, _Vector<4, float>, unsigned char)" >;
29822978 def extracti32x4_256_mask : X86Builtin<" _Vector<4, int>(_Vector<8, int>, _Constant int, _Vector<4, int>, unsigned char)" >;
29832979}
0 commit comments