Author: Oliver Hunt
Date: 2025-11-16T10:44:25Z
New Revision: 56733058ed01eaccdf6fc520c38824d0d1eb6733

URL: 
https://github.com/llvm/llvm-project/commit/56733058ed01eaccdf6fc520c38824d0d1eb6733
DIFF: 
https://github.com/llvm/llvm-project/commit/56733058ed01eaccdf6fc520c38824d0d1eb6733.diff

LOG: [NFC][clang] Correct bswapg test to work when int128 is not available 
(#168261)

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

Added: 
    

Modified: 
    clang/test/CodeGen/builtins.c

Removed: 
    


################################################################################
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


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to