Hi, Case pr42172-1.c failed on pre-armv7 processors because GCC actually generates better code without ldr instruction. This patch just refines test case by checking str instead of ldr, makes sure the case passes on all arm processors. In the end, we need to fix GCC combiner to generate optimal code on armv7 processors too. PR42172 is kept open for that purpose.
This is obvious change, is it OK for branches too? gcc/testsuite/ChangeLog 2015-04-22 Bin Cheng <bin.ch...@arm.com> * gcc.target/arm/pr42172-1.c: Check str instead of ldr.
diff --git a/gcc/testsuite/gcc.target/arm/pr42172-1.c b/gcc/testsuite/gcc.target/arm/pr42172-1.c index 207f600..a3de02f 100644 --- a/gcc/testsuite/gcc.target/arm/pr42172-1.c +++ b/gcc/testsuite/gcc.target/arm/pr42172-1.c @@ -16,4 +16,4 @@ void init_A (struct A *this) this->f4 = 0; } -/* { dg-final { scan-assembler-times "ldr" 1 } } */ +/* { dg-final { scan-assembler-times "str" 1 } } */