gcc/testsuite/gcc.target/xtensa/funnel_shifter.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | |
| 4 | unsigned int test_0(const void *addr) |
| 5 | { |
| 6 | unsigned int n = (unsigned int)addr; |
| 7 | const unsigned int *a = (const unsigned int*)(n & ~3); |
| 8 | n = (n & 3) * 8; |
| 9 | return (a[0] >> n) | (a[1] << (32 - n)); |
| 10 | } |
| 11 | |
| 12 | unsigned int test_1(unsigned int a, unsigned int b) |
| 13 | { |
| 14 | return (a >> 16) + (b << 16); |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-assembler-times "src" 2 } } */ |