[clang] [clang][test] Fix builtin-rotate.c test __int128 test failure on ARM32 (PR #177732)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 23 20:50:24 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: NagaChaitanya Vellanki (chaitanyav)

<details>
<summary>Changes</summary>

- Run the INT128 prefix checks on 64-bit targets since __int128 is not supported on ARM32

Fixes https://lab.llvm.org/buildbot/#/builders/154/builds/26813

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


1 Files Affected:

- (modified) clang/test/CodeGen/builtin-rotate.c (+4-3) 


``````````diff
diff --git a/clang/test/CodeGen/builtin-rotate.c b/clang/test/CodeGen/builtin-rotate.c
index c64e2ad14955c..6e2d3f3dd31b6 100644
--- a/clang/test/CodeGen/builtin-rotate.c
+++ b/clang/test/CodeGen/builtin-rotate.c
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -ffreestanding %s -emit-llvm -o - | FileCheck %s
+// RUN: %if clang-target-64-bits %{ %clang_cc1 -ffreestanding %s -emit-llvm -o - | FileCheck %s --check-prefix=INT128 %}
 
 #include<stdint.h>
 
@@ -303,9 +304,9 @@ void test_wider_shift_amount(uint8_t u8, uint16_t u16, uint32_t u32, unsigned _B
 }
 
 #ifdef __SIZEOF_INT128__
-// CHECK-LABEL: test_int128_rotate
-// CHECK:  call i128 @llvm.fshl.i128(i128 %{{.*}}, i128 %{{.*}}, i128 32)
-// CHECK:  call i128 @llvm.fshr.i128(i128 %{{.*}}, i128 %{{.*}}, i128 32)
+// INT128-LABEL: test_int128_rotate
+// INT128:  call i128 @llvm.fshl.i128(i128 %{{.*}}, i128 %{{.*}}, i128 32)
+// INT128:  call i128 @llvm.fshr.i128(i128 %{{.*}}, i128 %{{.*}}, i128 32)
 void test_int128_rotate(unsigned __int128 u128) {
   volatile unsigned __int128 result_u128;
   result_u128 = __builtin_stdc_rotate_left(u128, 32);

``````````

</details>


https://github.com/llvm/llvm-project/pull/177732


More information about the cfe-commits mailing list