From 78c98bf2d98bba45b128e1461f79b85ba12d2775 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Thu, 28 Sep 2017 14:59:44 +0200 Subject: [PATCH] Commit forgotten testecase for pr71727. From-SVN: r253251 --- gcc/testsuite/gcc.target/aarch64/pr71727-2.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/pr71727-2.c diff --git a/gcc/testsuite/gcc.target/aarch64/pr71727-2.c b/gcc/testsuite/gcc.target/aarch64/pr71727-2.c new file mode 100644 index 00000000000..2bc803ab330 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr71727-2.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-mstrict-align -O3" } */ + +unsigned char foo(const unsigned char *buffer, unsigned int length) +{ + unsigned char sum; + unsigned int count; + + for (sum = 0, count = 0; count < length; count++) { + sum = (unsigned char) (sum + *(buffer + count)); + } + + return sum; +} + +/* { dg-final { scan-assembler-times "and\tw\[0-9\]+, w\[0-9\]+, 15" 1 } } */ -- 2.30.2