gcc/testsuite/gcc.target/aarch64/pr71727-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-mstrict-align -O3" } */ |
| 3 | |
| 4 | #pragma GCC target "+nosve" |
| 5 | |
| 6 | unsigned char foo(const unsigned char *buffer, unsigned int length) |
| 7 | { |
| 8 | unsigned char sum; |
| 9 | unsigned int count; |
| 10 | |
| 11 | for (sum = 0, count = 0; count < length; count++) { |
| 12 | sum = (unsigned char) (sum + *(buffer + count)); |
| 13 | } |
| 14 | |
| 15 | return sum; |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-assembler-times "and\tw\[0-9\]+, w\[0-9\]+, 15" 1 } } */ |