Skip to content

Commit 0332af2

Browse files
authored
[X86] BuiltinsX86.td - merge avx512 cmp/ucmp builtins into common Features/Attributes blocks. NFC. (llvm#169223)
1 parent 21378fb commit 0332af2

File tree

1 file changed

+22
-74
lines changed

1 file changed

+22
-74
lines changed

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 22 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,109 +1246,58 @@ let Features = "avx512bw", Attributes = [NoThrow, Const, Constexpr] in {
12461246
def knotdi : X86Builtin<"unsigned long long int(unsigned long long int)">;
12471247
}
12481248

1249-
let Features = "avx512vl,avx512bw",
1250-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
1251-
def cmpb128_mask : X86Builtin<"unsigned short(_Vector<16, char>, _Vector<16, char>, _Constant int, unsigned short)">;
1252-
}
1253-
1254-
let Features = "avx512vl",
1255-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
1249+
let Features = "avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
12561250
def cmpd128_mask : X86Builtin<"unsigned char(_Vector<4, int>, _Vector<4, int>, _Constant int, unsigned char)">;
12571251
def cmpq128_mask : X86Builtin<"unsigned char(_Vector<2, long long int>, _Vector<2, long long int>, _Constant int, unsigned char)">;
1258-
}
1259-
1260-
let Features = "avx512vl,avx512bw",
1261-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
1262-
def cmpw128_mask : X86Builtin<"unsigned char(_Vector<8, short>, _Vector<8, short>, _Constant int, unsigned char)">;
1263-
}
1264-
1265-
let Features = "avx512vl,avx512bw",
1266-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
1267-
def cmpb256_mask : X86Builtin<"unsigned int(_Vector<32, char>, _Vector<32, char>, _Constant int, unsigned int)">;
1268-
}
1269-
1270-
let Features = "avx512vl",
1271-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
1272-
def cmpd256_mask : X86Builtin<"unsigned char(_Vector<8, int>, _Vector<8, int>, _Constant int, unsigned char)">;
1273-
def cmpq256_mask : X86Builtin<"unsigned char(_Vector<4, long long int>, _Vector<4, long long int>, _Constant int, unsigned char)">;
1274-
}
1275-
1276-
let Features = "avx512vl,avx512bw",
1277-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
1278-
def cmpw256_mask : X86Builtin<"unsigned short(_Vector<16, short>, _Vector<16, short>, _Constant int, unsigned short)">;
1279-
}
1280-
1281-
let Features = "avx512bw",
1282-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
1283-
def cmpb512_mask : X86Builtin<"unsigned long long int(_Vector<64, char>, _Vector<64, char>, _Constant int, unsigned long long int)">;
1284-
}
1285-
1286-
let Features = "avx512f",
1287-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
1288-
def cmpd512_mask : X86Builtin<"unsigned short(_Vector<16, int>, _Vector<16, int>, _Constant int, unsigned short)">;
1289-
def cmpq512_mask : X86Builtin<"unsigned char(_Vector<8, long long int>, _Vector<8, long long int>, _Constant int, unsigned char)">;
1290-
}
1291-
1292-
let Features = "avx512bw",
1293-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
1294-
def cmpw512_mask : X86Builtin<"unsigned int(_Vector<32, short>, _Vector<32, short>, _Constant int, unsigned int)">;
1295-
}
1296-
1297-
let Features = "avx512vl,avx512bw",
1298-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
1299-
def ucmpb128_mask : X86Builtin<"unsigned short(_Vector<16, char>, _Vector<16, char>, _Constant int, unsigned short)">;
1300-
}
13011252

1302-
let Features = "avx512vl",
1303-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
13041253
def ucmpd128_mask : X86Builtin<"unsigned char(_Vector<4, int>, _Vector<4, int>, _Constant int, unsigned char)">;
13051254
def ucmpq128_mask : X86Builtin<"unsigned char(_Vector<2, long long int>, _Vector<2, long long int>, _Constant int, unsigned char)">;
13061255
}
13071256

1308-
let Features = "avx512vl,avx512bw",
1309-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
1257+
let Features = "avx512vl,avx512bw", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
1258+
def cmpb128_mask : X86Builtin<"unsigned short(_Vector<16, char>, _Vector<16, char>, _Constant int, unsigned short)">;
1259+
def cmpw128_mask : X86Builtin<"unsigned char(_Vector<8, short>, _Vector<8, short>, _Constant int, unsigned char)">;
1260+
1261+
def ucmpb128_mask : X86Builtin<"unsigned short(_Vector<16, char>, _Vector<16, char>, _Constant int, unsigned short)">;
13101262
def ucmpw128_mask : X86Builtin<"unsigned char(_Vector<8, short>, _Vector<8, short>, _Constant int, unsigned char)">;
13111263
}
13121264

1313-
let Features = "avx512vl,avx512bw",
1314-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
1315-
def ucmpb256_mask : X86Builtin<"unsigned int(_Vector<32, char>, _Vector<32, char>, _Constant int, unsigned int)">;
1316-
}
1265+
let Features = "avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
1266+
def cmpd256_mask : X86Builtin<"unsigned char(_Vector<8, int>, _Vector<8, int>, _Constant int, unsigned char)">;
1267+
def cmpq256_mask : X86Builtin<"unsigned char(_Vector<4, long long int>, _Vector<4, long long int>, _Constant int, unsigned char)">;
13171268

1318-
let Features = "avx512vl",
1319-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
13201269
def ucmpd256_mask : X86Builtin<"unsigned char(_Vector<8, int>, _Vector<8, int>, _Constant int, unsigned char)">;
13211270
def ucmpq256_mask : X86Builtin<"unsigned char(_Vector<4, long long int>, _Vector<4, long long int>, _Constant int, unsigned char)">;
13221271
}
13231272

1324-
let Features = "avx512vl,avx512bw",
1325-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
1273+
let Features = "avx512vl,avx512bw", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
1274+
def cmpb256_mask : X86Builtin<"unsigned int(_Vector<32, char>, _Vector<32, char>, _Constant int, unsigned int)">;
1275+
def cmpw256_mask : X86Builtin<"unsigned short(_Vector<16, short>, _Vector<16, short>, _Constant int, unsigned short)">;
1276+
1277+
def ucmpb256_mask : X86Builtin<"unsigned int(_Vector<32, char>, _Vector<32, char>, _Constant int, unsigned int)">;
13261278
def ucmpw256_mask : X86Builtin<"unsigned short(_Vector<16, short>, _Vector<16, short>, _Constant int, unsigned short)">;
13271279
}
13281280

1329-
let Features = "avx512bw",
1330-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
1331-
def ucmpb512_mask : X86Builtin<"unsigned long long int(_Vector<64, char>, _Vector<64, char>, _Constant int, unsigned long long int)">;
1332-
}
1281+
let Features = "avx512f", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
1282+
def cmpd512_mask : X86Builtin<"unsigned short(_Vector<16, int>, _Vector<16, int>, _Constant int, unsigned short)">;
1283+
def cmpq512_mask : X86Builtin<"unsigned char(_Vector<8, long long int>, _Vector<8, long long int>, _Constant int, unsigned char)">;
13331284

1334-
let Features = "avx512f",
1335-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
13361285
def ucmpd512_mask : X86Builtin<"unsigned short(_Vector<16, int>, _Vector<16, int>, _Constant int, unsigned short)">;
13371286
def ucmpq512_mask : X86Builtin<"unsigned char(_Vector<8, long long int>, _Vector<8, long long int>, _Constant int, unsigned char)">;
13381287
}
13391288

1340-
let Features = "avx512bw",
1341-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
1342-
def ucmpw512_mask : X86Builtin<"unsigned int(_Vector<32, short>, _Vector<32, short>, _Constant int, unsigned int)">;
1343-
}
1344-
13451289
let Features = "avx512bw", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
13461290
def packsswb512 : X86Builtin<"_Vector<64, char>(_Vector<32, short>, _Vector<32, short>)">;
13471291
def packssdw512 : X86Builtin<"_Vector<32, short>(_Vector<16, int>, _Vector<16, int>)">;
13481292
def packuswb512 : X86Builtin<"_Vector<64, char>(_Vector<32, short>, _Vector<32, short>)">;
13491293
def packusdw512 : X86Builtin<"_Vector<32, short>(_Vector<16, int>, _Vector<16, int>)">;
13501294

13511295
def pshufb512 : X86Builtin<"_Vector<64, char>(_Vector<64, char>, _Vector<64, char>)">;
1296+
1297+
def cmpb512_mask : X86Builtin<"unsigned long long int(_Vector<64, char>, _Vector<64, char>, _Constant int, unsigned long long int)">;
1298+
def cmpw512_mask : X86Builtin<"unsigned int(_Vector<32, short>, _Vector<32, short>, _Constant int, unsigned int)">;
1299+
def ucmpb512_mask : X86Builtin<"unsigned long long int(_Vector<64, char>, _Vector<64, char>, _Constant int, unsigned long long int)">;
1300+
def ucmpw512_mask : X86Builtin<"unsigned int(_Vector<32, short>, _Vector<32, short>, _Constant int, unsigned int)">;
13521301
}
13531302

13541303
let Features = "avx512cd,avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
@@ -1397,7 +1346,6 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
13971346
def subps512 : X86Builtin<"_Vector<16, float>(_Vector<16, float>, _Vector<16, float>, _Constant int)">;
13981347
}
13991348

1400-
14011349
let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
14021350
def addss_round_mask : X86Builtin<"_Vector<4, float>(_Vector<4, float>, _Vector<4, float>, _Vector<4, float>, unsigned char, _Constant int)">;
14031351
def divss_round_mask : X86Builtin<"_Vector<4, float>(_Vector<4, float>, _Vector<4, float>, _Vector<4, float>, unsigned char, _Constant int)">;

0 commit comments

Comments
 (0)