gcc/testsuite/gcc.target/powerpc/vec-rotate-2.c
raw| 1 | /* { dg-options "-O3 -mdejagnu-cpu=power8" } */ |
| 2 | |
| 3 | /* Check vectorizer can exploit vector rotation instructions on Power8, mainly |
| 4 | for the case rotation count is const number. |
| 5 | |
| 6 | Check for vrld which is available on Power8 and above. */ |
| 7 | |
| 8 | #define N 256 |
| 9 | unsigned long long sud[N], rud[N]; |
| 10 | |
| 11 | void |
| 12 | testULL () |
| 13 | { |
| 14 | for (int i = 0; i < 256; ++i) |
| 15 | rud[i] = (sud[i] >> 8) | (sud[i] << (sizeof (sud[0]) * 8 - 8)); |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-assembler {\mvrld\M} } } */ |