1 /* { dg-do compile { target arm*-*-* alpha*-*-* i?86-*-* powerpc*-*-* rs6000-*-* x86_64-*-* s390*-*-* } } */
2 /* { dg-require-effective-target stdint_types } */
3 /* { dg-options "-O2 -fdump-rtl-combine" } */
4 /* { dg-options "-O2 -fdump-rtl-combine -march=z900" { target s390-*-* } } */
8 #define BS(X) __builtin_bswap32(X)
10 uint32_t foo1 (uint32_t a
)
15 uint32_t foo2 (uint32_t a
)
17 return BS (BS (a
) & 0xA0000);
20 uint32_t foo3 (uint32_t a
)
22 return BS (BS (a
) | 0xA0000);
25 uint32_t foo4 (uint32_t a
)
27 return BS (BS (a
) ^ 0xA0000);
30 uint32_t foo5 (uint32_t a
, uint32_t b
)
32 return BS (BS (a
) & BS (b
));
35 uint32_t foo6 (uint32_t a
, uint32_t b
)
37 return BS (BS (a
) | BS (b
));
40 uint32_t foo7 (uint32_t a
, uint32_t b
)
42 return BS (BS (a
) ^ BS (b
));
45 /* { dg-final { scan-rtl-dump-not "bswapsi" "combine" } } */