Revert "[GVN] MemorySSA for GVN: add optional `AllowMemorySSA`"
[llvm-project.git] / compiler-rt / test / builtins / Unit / bswapsi2_test.c
blob425071d826d4653cd6dccd87f0fc22251b897fe4
1 // UNSUPPORTED: armv6m-target-arch
2 // RUN: %clang_builtins %s %librt -o %t && %run %t
3 // REQUIRES: librt_has_bswapsi2
5 #include <math.h>
6 #include <stdint.h>
7 #include <stdio.h>
8 #include <stdlib.h>
10 extern uint32_t __bswapsi2(uint32_t);
12 int test__bswapsi2(uint32_t a, uint32_t expected) {
13 uint32_t actual = __bswapsi2(a);
14 if (actual != expected)
15 printf("error in test__bswapsi2(0x%0X) = 0x%0X, expected 0x%0X\n", a,
16 actual, expected);
17 return actual != expected;
20 int main() {
21 if (test__bswapsi2(0x12345678, 0x78563412))
22 return 1;
23 if (test__bswapsi2(0x00000001, 0x01000000))
24 return 1;
25 return 0;