Commit forgotten testecase for pr71727.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / pr71727-2.c
blob2bc803ab330ddbab9017fb96398cca252cabe6e4
1 /* { dg-do compile } */
2 /* { dg-options "-mstrict-align -O3" } */
4 unsigned char foo(const unsigned char *buffer, unsigned int length)
6 unsigned char sum;
7 unsigned int count;
9 for (sum = 0, count = 0; count < length; count++) {
10 sum = (unsigned char) (sum + *(buffer + count));
13 return sum;
16 /* { dg-final { scan-assembler-times "and\tw\[0-9\]+, w\[0-9\]+, 15" 1 } } */