Skip to content

Commit f77270c

Browse files
committed
[NFC][clang] Correct bswapg test to work when int128 is not available
This updates the test to avoid inclusion of int128 bswapg tests on targets that don't support int128 at all. This fixes failures introduced by #162433
1 parent 74c4029 commit f77270c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/test/CodeGen/builtins.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,10 @@ void test_builtin_ctzg(unsigned char uc, unsigned short us, unsigned int ui,
12891289
// CHECK-LABEL: define{{.*}} void @test_builtin_bswapg
12901290
void test_builtin_bswapg(unsigned char uc, unsigned short us, unsigned int ui,
12911291
unsigned long ul, unsigned long long ull,
1292-
unsigned __int128 ui128, _BitInt(8) bi8,
1292+
#ifdef __SIZEOF_INT128__
1293+
unsigned __int128 ui128,
1294+
#endif
1295+
_BitInt(8) bi8,
12931296
_BitInt(16) bi16, _BitInt(32) bi32,
12941297
_BitInt(64) bi64, _BitInt(128) bi128) {
12951298
uc = __builtin_bswapg(uc);
@@ -1303,8 +1306,10 @@ void test_builtin_bswapg(unsigned char uc, unsigned short us, unsigned int ui,
13031306
// CHECK: call i64 @llvm.bswap.i64
13041307
ull = __builtin_bswapg(ull);
13051308
// CHECK: call i64 @llvm.bswap.i64
1309+
#ifdef __SIZEOF_INT128__
13061310
ui128 = __builtin_bswapg(ui128);
13071311
// CHECK: call i128 @llvm.bswap.i128
1312+
#endif
13081313
bi8 = __builtin_bswapg(bi8);
13091314
// CHECK: %17 = load i8, ptr %bi8.addr, align 1
13101315
// CHECK: store i8 %17, ptr %bi8.addr

0 commit comments

Comments
 (0)