diff mbox

[testsuite] Add loop unrolling command line options for some test cases

Message ID 000001cc7837$9bfb64e0$d3f22ea0$@liu@arm.com
State New
Headers show

Commit Message

Jiangning Liu Sept. 21, 2011, 8:22 a.m. UTC
Hi,

The following test cases are to check predictive commoning optimization by
detecting loop unrolling times. Originally by default the max-unroll-times
is 8. If max-unroll-times is specified to be less than the expected
unrolling times, those cases would fail. 

The fix is to explicitly turn on loop unroll and set max-unroll-times to 8,
which is larger than the unrolling times being detected in the cases.

ChangeLog:

2011-09-14  Jiangning Liu  <jiangning.liu@arm.com>

        * gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c: Explicitly turn on 
        loop unroll and set max unroll times to 8.
        * gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c: Likewise.
        * gcc/testsuite/gcc.dg/tree-ssa/predcom-3.c: Likewise.
        * gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c: Likewise.
        * gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c: Likewise.

Thanks,
-Jiangning

Comments

Mike Stump Sept. 21, 2011, 7:09 p.m. UTC | #1
On Sep 21, 2011, at 1:22 AM, Jiangning Liu wrote:
> The fix is to explicitly turn on loop unroll and set max-unroll-times to 8,
> which is larger than the unrolling times being detected in the cases.

Sounds reasonable to me.  Ok, though, do watch for any comments by people that know more than I.
Jiangning Liu Sept. 22, 2011, 4:22 a.m. UTC | #2
Hi Mike,

OK. I will wait 24 more hours. If no objections by then, I will get it
checked into trunk.

Thanks,
-Jiangning

> -----Original Message-----
> From: Mike Stump [mailto:mikestump@comcast.net]
> Sent: Thursday, September 22, 2011 3:10 AM
> To: Jiangning Liu
> Cc: gcc-patches@gcc.gnu.org; ro@CeBiTec.Uni-Bielefeld.DE
> Subject: Re: [PATCH, testsuite] Add loop unrolling command line options
> for some test cases
> 
> On Sep 21, 2011, at 1:22 AM, Jiangning Liu wrote:
> > The fix is to explicitly turn on loop unroll and set max-unroll-times
> to 8,
> > which is larger than the unrolling times being detected in the cases.
> 
> Sounds reasonable to me.  Ok, though, do watch for any comments by
> people that know more than I.
Richard Biener Sept. 24, 2011, 10:11 a.m. UTC | #3
On Thu, Sep 22, 2011 at 6:22 AM, Jiangning Liu <jiangning.liu@arm.com> wrote:
> Hi Mike,
>
> OK. I will wait 24 more hours. If no objections by then, I will get it
> checked into trunk.

I don't think you need -funroll-loops though.

> Thanks,
> -Jiangning
>
>> -----Original Message-----
>> From: Mike Stump [mailto:mikestump@comcast.net]
>> Sent: Thursday, September 22, 2011 3:10 AM
>> To: Jiangning Liu
>> Cc: gcc-patches@gcc.gnu.org; ro@CeBiTec.Uni-Bielefeld.DE
>> Subject: Re: [PATCH, testsuite] Add loop unrolling command line options
>> for some test cases
>>
>> On Sep 21, 2011, at 1:22 AM, Jiangning Liu wrote:
>> > The fix is to explicitly turn on loop unroll and set max-unroll-times
>> to 8,
>> > which is larger than the unrolling times being detected in the cases.
>>
>> Sounds reasonable to me.  Ok, though, do watch for any comments by
>> people that know more than I.
>
>
>
>
>
Jiangning Liu Sept. 26, 2011, 7:08 a.m. UTC | #4
> -----Original Message-----
> From: Richard Guenther [mailto:richard.guenther@gmail.com]
> Sent: Saturday, September 24, 2011 6:12 PM
> To: Jiangning Liu
> Cc: Mike Stump; gcc-patches@gcc.gnu.org; ro@cebitec.uni-bielefeld.de
> Subject: Re: [PATCH, testsuite] Add loop unrolling command line options
> for some test cases
> 
> On Thu, Sep 22, 2011 at 6:22 AM, Jiangning Liu <jiangning.liu@arm.com>
> wrote:
> > Hi Mike,
> >
> > OK. I will wait 24 more hours. If no objections by then, I will get
> it
> > checked into trunk.
> 
> I don't think you need -funroll-loops though.
> 

The intention of those test cases are not hurt if -funroll-loops is added,
right?

> > Thanks,
> > -Jiangning
> >
> >> -----Original Message-----
> >> From: Mike Stump [mailto:mikestump@comcast.net]
> >> Sent: Thursday, September 22, 2011 3:10 AM
> >> To: Jiangning Liu
> >> Cc: gcc-patches@gcc.gnu.org; ro@CeBiTec.Uni-Bielefeld.DE
> >> Subject: Re: [PATCH, testsuite] Add loop unrolling command line
> options
> >> for some test cases
> >>
> >> On Sep 21, 2011, at 1:22 AM, Jiangning Liu wrote:
> >> > The fix is to explicitly turn on loop unroll and set max-unroll-
> times
> >> to 8,
> >> > which is larger than the unrolling times being detected in the
> cases.
> >>
> >> Sounds reasonable to me.  Ok, though, do watch for any comments by
> >> people that know more than I.
> >
> >
> >
> >
> >
Richard Biener Sept. 26, 2011, 10:51 a.m. UTC | #5
On Mon, Sep 26, 2011 at 9:08 AM, Jiangning Liu <jiangning.liu@arm.com> wrote:
>> -----Original Message-----
>> From: Richard Guenther [mailto:richard.guenther@gmail.com]
>> Sent: Saturday, September 24, 2011 6:12 PM
>> To: Jiangning Liu
>> Cc: Mike Stump; gcc-patches@gcc.gnu.org; ro@cebitec.uni-bielefeld.de
>> Subject: Re: [PATCH, testsuite] Add loop unrolling command line options
>> for some test cases
>>
>> On Thu, Sep 22, 2011 at 6:22 AM, Jiangning Liu <jiangning.liu@arm.com>
>> wrote:
>> > Hi Mike,
>> >
>> > OK. I will wait 24 more hours. If no objections by then, I will get
>> it
>> > checked into trunk.
>>
>> I don't think you need -funroll-loops though.
>>
>
> The intention of those test cases are not hurt if -funroll-loops is added,
> right?

Right.

>> > Thanks,
>> > -Jiangning
>> >
>> >> -----Original Message-----
>> >> From: Mike Stump [mailto:mikestump@comcast.net]
>> >> Sent: Thursday, September 22, 2011 3:10 AM
>> >> To: Jiangning Liu
>> >> Cc: gcc-patches@gcc.gnu.org; ro@CeBiTec.Uni-Bielefeld.DE
>> >> Subject: Re: [PATCH, testsuite] Add loop unrolling command line
>> options
>> >> for some test cases
>> >>
>> >> On Sep 21, 2011, at 1:22 AM, Jiangning Liu wrote:
>> >> > The fix is to explicitly turn on loop unroll and set max-unroll-
>> times
>> >> to 8,
>> >> > which is larger than the unrolling times being detected in the
>> cases.
>> >>
>> >> Sounds reasonable to me.  Ok, though, do watch for any comments by
>> >> people that know more than I.
>> >
>> >
>> >
>> >
>> >
>
>
>
>
>
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c
b/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c
index 16bd5c9..f1e52e5 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-do run } */
-/* { dg-options "-O2 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8
-fpredictive-commoning -fdump-tree-pcom-details" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c
b/gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c
index 7275f28..27e53ee 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-do run } */
-/* { dg-options "-O2 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8
-fpredictive-commoning -fdump-tree-pcom-details" } */
 
 void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-3.c
b/gcc/testsuite/gcc.dg/tree-ssa/predcom-3.c
index d500234..5dfe384 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-3.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8
-fpredictive-commoning -fdump-tree-pcom-details" } */
 
 int a[1000], b[1000];
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c
b/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c
index 6f06b7f..c29a46a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-do run } */
-/* { dg-options "-O2 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8
-fpredictive-commoning -fdump-tree-pcom-details" } */
 
 /* Test for predictive commoning of expressions, without reassociation.  */
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c
b/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c
index 134fc37..29444ab 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-do run } */
-/* { dg-options "-O2 -fpredictive-commoning -fdump-tree-pcom-details" } */
+/* { dg-options "-O2 -funroll-loops --param max-unroll-times=8
-fpredictive-commoning -fdump-tree-pcom-details" } */
 
 /* Test for predictive commoning of expressions, with reassociation.  */