Patchwork [testsuite] Adjust optimization levels for some cases.

login
register
mail settings
Submitter Terry Guo
Date Oct. 20, 2011, 6:45 a.m.
Message ID <001201cc8ef3$d2c7fa60$7857ef20$@guo@arm.com>
Download mbox | patch
Permalink /patch/120736/
State New
Headers show

Comments

Terry Guo - Oct. 20, 2011, 6:45 a.m.
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.guo@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.
Mike Stump - Oct. 25, 2011, 7:48 p.m.
On Oct 19, 2011, at 11:45 PM, Terry Guo wrote:
> 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?

I've not seen any approval, rejection or review of this yet.  Absents objections from the arm folks or the optimization folks, Ok.  If someone thinks this is a bad idea, time to step forward.  :-)

> 2011-10-20  Terry Guo  <terry.guo@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

> -/* { dg-options "-O2" } */
> +/* { dg-options "-O1 -fexpensive-optimizations" } */

Patch

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)
 {