Skip to content

Conversation

@ojhunt
Copy link
Contributor

@ojhunt ojhunt commented Nov 16, 2025

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

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
@ojhunt ojhunt self-assigned this Nov 16, 2025
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Nov 16, 2025
@ojhunt ojhunt enabled auto-merge (squash) November 16, 2025 10:19
@llvmbot
Copy link
Member

llvmbot commented Nov 16, 2025

@llvm/pr-subscribers-clang

Author: Oliver Hunt (ojhunt)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/168261.diff

1 Files Affected:

  • (modified) clang/test/CodeGen/builtins.c (+6-1)
diff --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c
index 79859762b9457..c1183a6599f21 100644
--- a/clang/test/CodeGen/builtins.c
+++ b/clang/test/CodeGen/builtins.c
@@ -1289,7 +1289,10 @@ void test_builtin_ctzg(unsigned char uc, unsigned short us, unsigned int ui,
 // CHECK-LABEL: define{{.*}} void @test_builtin_bswapg
 void test_builtin_bswapg(unsigned char uc, unsigned short us, unsigned int ui,
                        unsigned long ul, unsigned long long ull,
-                       unsigned __int128 ui128, _BitInt(8) bi8,
+#ifdef __SIZEOF_INT128__
+                       unsigned __int128 ui128,
+#endif
+                       _BitInt(8) bi8,
                        _BitInt(16) bi16, _BitInt(32) bi32, 
                        _BitInt(64) bi64, _BitInt(128) bi128) {
   uc = __builtin_bswapg(uc);
@@ -1303,8 +1306,10 @@ void test_builtin_bswapg(unsigned char uc, unsigned short us, unsigned int ui,
   // CHECK: call i64 @llvm.bswap.i64
   ull = __builtin_bswapg(ull);
   // CHECK: call i64 @llvm.bswap.i64
+#ifdef __SIZEOF_INT128__
   ui128 = __builtin_bswapg(ui128);
   // CHECK: call i128 @llvm.bswap.i128
+#endif
   bi8 = __builtin_bswapg(bi8);
   // CHECK: %17 = load i8, ptr %bi8.addr, align 1
   // CHECK: store i8 %17, ptr %bi8.addr

@ojhunt ojhunt merged commit 5673305 into main Nov 16, 2025
11 of 12 checks passed
@ojhunt ojhunt deleted the users/ojhunt/fix-builtins.c-bswapg-test branch November 16, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants