[AMDGPU] Remove s_wakeup_barrier instruction (#122277)
[llvm-project.git] / compiler-rt / test / builtins / Unit / bswapdi2_test.c
blob9f619397a66a7363b93f9b879c9b417df7c51a68
1 // UNSUPPORTED: armv6m-target-arch
2 // RUN: %clang_builtins %s %librt -o %t && %run %t
3 // REQUIRES: librt_has_bswapdi2
5 #include <math.h>
6 #include <stdint.h>
7 #include <stdio.h>
8 #include <stdlib.h>
10 extern uint64_t __bswapdi2(uint64_t);
12 int test__bswapdi2(uint64_t a, uint64_t expected) {
13 uint64_t actual = __bswapdi2(a);
14 if (actual != expected)
15 printf("error in test__bswapsi2(0x%0llX) = 0x%0llX, expected 0x%0llX\n", a,
16 actual, expected);
17 return actual != expected;
20 int main() {
21 if (test__bswapdi2(0x123456789ABCDEF0LL, 0xF0DEBC9A78563412LL))
22 return 1;
23 if (test__bswapdi2(0x0000000100000002LL, 0x0200000001000000LL))
24 return 1;
25 return 0;