This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, ARM] Fix testcase for PR64616
- From: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- To: <gcc-patches at gcc dot gnu dot org>, "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>, "Ramana Radhakrishnan" <ramana dot radhakrishnan at arm dot com>, "Nicholas Clifton" <nickc at redhat dot com>, "Kyrylo Tkachov" <kyrylo dot tkachov at arm dot com>
- Date: Mon, 11 May 2015 17:43:27 +0800
- Subject: [PATCH, ARM] Fix testcase for PR64616
- Authentication-results: sourceware.org; auth=none
Hi,
Testcase made for PR64616 was only passing when using a litteral pool. Rather than having an alternative for systems where this is not true, this patch changes the test to check that a global copy propagation occurs in cprop2. This should work accross all ARM targets (it works when targetting Cortex-M0, Cortex-M3 and whatever default core for ARMv7-a with vfpv3-d16 FPU).
ChangeLog entry is as follows:
*** gcc/testsuite/ChangeLog ***
2015-05-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
* gcc.target/arm/pr64616.c: Test dump rather than assembly to work
accross ARM targets.
diff --git a/gcc/testsuite/gcc.target/arm/pr64616.c b/gcc/testsuite/gcc.target/arm/pr64616.c
index c686ffa..2280f21 100644
--- a/gcc/testsuite/gcc.target/arm/pr64616.c
+++ b/gcc/testsuite/gcc.target/arm/pr64616.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fdump-rtl-cprop2" } */
int f (int);
unsigned int glob;
@@ -11,4 +11,5 @@ g ()
glob = 5;
}
-/* { dg-final { scan-assembler-times "ldr" 2 } } */
+/* { dg-final { scan-rtl-dump "GLOBAL COPY-PROP" "cprop2" } } */
+/* { dg-final { cleanup-rtl-dump "cprop2" } } */
Patch was tested by verifying that the pattern appears when targeting Cortex-M0, Cortex-M3 and
the default core for ARMv7-a with vfpv3-d16 FPU.
Best regards,
Thomas