gcc/testsuite/gcc.target/aarch64/pr106594_1.c
raw| 1 | /* { dg-options "-O2" } */ |
| 2 | |
| 3 | extern const int constellation_64qam[64]; |
| 4 | |
| 5 | void foo(int nbits, |
| 6 | const char *p_src, |
| 7 | int *p_dst) { |
| 8 | |
| 9 | while (nbits > 0U) { |
| 10 | char first = *p_src++; |
| 11 | |
| 12 | char index1 = ((first & 0x3) << 4) | (first >> 4); |
| 13 | |
| 14 | *p_dst++ = constellation_64qam[index1]; |
| 15 | |
| 16 | nbits--; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-assembler {(?n)\tldr\t.*\[x[0-9]+, w[0-9]+, sxtw #?2\]} } } */ |