Hello,

These four cases check the amount of the desired instructions. At O2 level,
some factors like loop unroll will increase the amount of them. This patch
is proposing to adjust the optimization level to O1 (the minimal
requirement) to avoid such impact. In this way, the cases are more robust.
Regression test is performed on arm-none-eabi target. No regression found.
Is it OK to trunk?

BR,
Terry

2011-10-20  Terry Guo  <terry....@arm.com>

        * gcc.target/arm/wmul-1.c: Adjust optimization levels.
        * gcc.target/arm/wmul-2.c: Ditto.
        * gcc.target/arm/wmul-3.c: Ditto.
        * gcc.target/arm/wmul-4.c: Ditto.

diff --git a/gcc/testsuite/gcc.target/arm/wmul-1.c
b/gcc/testsuite/gcc.target/arm/wmul-1.c
index 426c939..ddddd50 100644
--- a/gcc/testsuite/gcc.target/arm/wmul-1.c
+++ b/gcc/testsuite/gcc.target/arm/wmul-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_dsp } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O1 -fexpensive-optimizations" } */
 
 int mac(const short *a, const short *b, int sqr, int *sum)
 {
diff --git a/gcc/testsuite/gcc.target/arm/wmul-2.c
b/gcc/testsuite/gcc.target/arm/wmul-2.c
index 898b5f0..2ea55f9 100644
--- a/gcc/testsuite/gcc.target/arm/wmul-2.c
+++ b/gcc/testsuite/gcc.target/arm/wmul-2.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_dsp } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O1 -fexpensive-optimizations" } */
 
 void vec_mpy(int y[], const short x[], short scaler)
 {
diff --git a/gcc/testsuite/gcc.target/arm/wmul-3.c
b/gcc/testsuite/gcc.target/arm/wmul-3.c
index 83f73fb..144b553 100644
--- a/gcc/testsuite/gcc.target/arm/wmul-3.c
+++ b/gcc/testsuite/gcc.target/arm/wmul-3.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_dsp } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O1 -fexpensive-optimizations" } */
 
 int mac(const short *a, const short *b, int sqr, int *sum)
 {
diff --git a/gcc/testsuite/gcc.target/arm/wmul-4.c
b/gcc/testsuite/gcc.target/arm/wmul-4.c
index a297bda..68f9866 100644
--- a/gcc/testsuite/gcc.target/arm/wmul-4.c
+++ b/gcc/testsuite/gcc.target/arm/wmul-4.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_dsp } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O1 -fexpensive-optimizations" } */
 
 int mac(const int *a, const int *b, long long sqr, long long *sum)
 {



Reply via email to