[PATCH] Adjust gcc.dg/uninit-pred-8_b.c (PR89551)

2019-03-04 Thread Richard Biener


The CFG cleanup change made us remove an extra forwarder which somehow
makes VRP jump threading go berzerk.  Fortunately only on
logical-op-non-short-circuit=0 targets so the easy way to fix the
testcase is to force that our way.

Tested on powerpc64le-linux-gnu and x86_64-linux-gnu.

I'll hold off applying this for a bit in case Jeff wants to
analyze why/how we're doing extra jump threading just because
of the lack of that extra forwarder...

Richard.

2019-03-04  Richard Biener  

PR testsuite/89551
* gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit
the way that makes the testcase PASS.

Index: gcc/testsuite/gcc.dg/uninit-pred-8_b.c
===
--- gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (revision 269361)
+++ gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (working copy)
@@ -1,6 +1,7 @@
-
 /* { dg-do compile } */
-/* { dg-options "-Wuninitialized -O2" } */
+/* ???  Jump threading makes a mess of the logical-op-non-short-circuit=0 case
+   so force it our way.  */
+/* { dg-options "-Wuninitialized -O2 --param logical-op-non-short-circuit=1" } 
*/
 
 int g;
 void bar();


Re: [PATCH] Adjust gcc.dg/uninit-pred-8_b.c (PR89551)

2019-03-06 Thread Richard Biener
On Mon, 4 Mar 2019, Richard Biener wrote:

> 
> The CFG cleanup change made us remove an extra forwarder which somehow
> makes VRP jump threading go berzerk.  Fortunately only on
> logical-op-non-short-circuit=0 targets so the easy way to fix the
> testcase is to force that our way.
> 
> Tested on powerpc64le-linux-gnu and x86_64-linux-gnu.
> 
> I'll hold off applying this for a bit in case Jeff wants to
> analyze why/how we're doing extra jump threading just because
> of the lack of that extra forwarder...

r269416.

Richard.

> 2019-03-04  Richard Biener  
> 
>   PR testsuite/89551
>   * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit
>   the way that makes the testcase PASS.
> 
> Index: gcc/testsuite/gcc.dg/uninit-pred-8_b.c
> ===
> --- gcc/testsuite/gcc.dg/uninit-pred-8_b.c(revision 269361)
> +++ gcc/testsuite/gcc.dg/uninit-pred-8_b.c(working copy)
> @@ -1,6 +1,7 @@
> -
>  /* { dg-do compile } */
> -/* { dg-options "-Wuninitialized -O2" } */
> +/* ???  Jump threading makes a mess of the logical-op-non-short-circuit=0 
> case
> +   so force it our way.  */
> +/* { dg-options "-Wuninitialized -O2 --param logical-op-non-short-circuit=1" 
> } */
>  
>  int g;
>  void bar();
> 


Re: [PATCH] Adjust gcc.dg/uninit-pred-8_b.c (PR89551)

2019-03-14 Thread Christophe Lyon
On Mon, 4 Mar 2019 at 11:25, Richard Biener  wrote:
>
>
> The CFG cleanup change made us remove an extra forwarder which somehow
> makes VRP jump threading go berzerk.  Fortunately only on
> logical-op-non-short-circuit=0 targets so the easy way to fix the
> testcase is to force that our way.
>
> Tested on powerpc64le-linux-gnu and x86_64-linux-gnu.
>
> I'll hold off applying this for a bit in case Jeff wants to
> analyze why/how we're doing extra jump threading just because
> of the lack of that extra forwarder...
>
> Richard.
>
> 2019-03-04  Richard Biener  
>
> PR testsuite/89551
> * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit
> the way that makes the testcase PASS.

Hi Richard,

I think you forgot to backport this to gcc-8-branch when you committed r269650?

Christophe


>
> Index: gcc/testsuite/gcc.dg/uninit-pred-8_b.c
> ===
> --- gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (revision 269361)
> +++ gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (working copy)
> @@ -1,6 +1,7 @@
> -
>  /* { dg-do compile } */
> -/* { dg-options "-Wuninitialized -O2" } */
> +/* ???  Jump threading makes a mess of the logical-op-non-short-circuit=0 
> case
> +   so force it our way.  */
> +/* { dg-options "-Wuninitialized -O2 --param logical-op-non-short-circuit=1" 
> } */
>
>  int g;
>  void bar();


Re: [PATCH] Adjust gcc.dg/uninit-pred-8_b.c (PR89551)

2019-03-14 Thread Richard Biener
On March 14, 2019 3:32:39 PM GMT+01:00, Christophe Lyon 
 wrote:
>On Mon, 4 Mar 2019 at 11:25, Richard Biener  wrote:
>>
>>
>> The CFG cleanup change made us remove an extra forwarder which
>somehow
>> makes VRP jump threading go berzerk.  Fortunately only on
>> logical-op-non-short-circuit=0 targets so the easy way to fix the
>> testcase is to force that our way.
>>
>> Tested on powerpc64le-linux-gnu and x86_64-linux-gnu.
>>
>> I'll hold off applying this for a bit in case Jeff wants to
>> analyze why/how we're doing extra jump threading just because
>> of the lack of that extra forwarder...
>>
>> Richard.
>>
>> 2019-03-04  Richard Biener  
>>
>> PR testsuite/89551
>> * gcc.dg/uninit-pred-8_b.c: Force
>logical-op-non-short-circuit
>> the way that makes the testcase PASS.
>
>Hi Richard,
>
>I think you forgot to backport this to gcc-8-branch when you committed
>r269650?

Whoops, quite possible. I'll fixup later or tomorrow. 

Richard. 

>Christophe
>
>
>>
>> Index: gcc/testsuite/gcc.dg/uninit-pred-8_b.c
>> ===
>> --- gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (revision 269361)
>> +++ gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (working copy)
>> @@ -1,6 +1,7 @@
>> -
>>  /* { dg-do compile } */
>> -/* { dg-options "-Wuninitialized -O2" } */
>> +/* ???  Jump threading makes a mess of the
>logical-op-non-short-circuit=0 case
>> +   so force it our way.  */
>> +/* { dg-options "-Wuninitialized -O2 --param
>logical-op-non-short-circuit=1" } */
>>
>>  int g;
>>  void bar();



Re: [PATCH] Adjust gcc.dg/uninit-pred-8_b.c (PR89551)

2019-03-14 Thread Jakub Jelinek
On Thu, Mar 14, 2019 at 03:32:39PM +0100, Christophe Lyon wrote:
> > 2019-03-04  Richard Biener  
> >
> > PR testsuite/89551
> > * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit
> > the way that makes the testcase PASS.
> 
> Hi Richard,
> 
> I think you forgot to backport this to gcc-8-branch when you committed 
> r269650?

That param is not supported in 8.x or older.

> > --- gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (revision 269361)
> > +++ gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (working copy)
> > @@ -1,6 +1,7 @@
> > -
> >  /* { dg-do compile } */
> > -/* { dg-options "-Wuninitialized -O2" } */
> > +/* ???  Jump threading makes a mess of the logical-op-non-short-circuit=0 
> > case
> > +   so force it our way.  */
> > +/* { dg-options "-Wuninitialized -O2 --param 
> > logical-op-non-short-circuit=1" } */
> >
> >  int g;
> >  void bar();

Jakub


Re: [PATCH] Adjust gcc.dg/uninit-pred-8_b.c (PR89551)

2019-03-14 Thread Christophe Lyon
On Thu, 14 Mar 2019 at 15:35, Jakub Jelinek  wrote:
>
> On Thu, Mar 14, 2019 at 03:32:39PM +0100, Christophe Lyon wrote:
> > > 2019-03-04  Richard Biener  
> > >
> > > PR testsuite/89551
> > > * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit
> > > the way that makes the testcase PASS.
> >
> > Hi Richard,
> >
> > I think you forgot to backport this to gcc-8-branch when you committed 
> > r269650?
>
> That param is not supported in 8.x or older.

OK. I noticed this because I saw the same regressions I reported on
trunk on some arm configs:
https://gcc.gnu.org/ml/gcc-patches/2019-03/msg00125.html


>
> > > --- gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (revision 269361)
> > > +++ gcc/testsuite/gcc.dg/uninit-pred-8_b.c  (working copy)
> > > @@ -1,6 +1,7 @@
> > > -
> > >  /* { dg-do compile } */
> > > -/* { dg-options "-Wuninitialized -O2" } */
> > > +/* ???  Jump threading makes a mess of the 
> > > logical-op-non-short-circuit=0 case
> > > +   so force it our way.  */
> > > +/* { dg-options "-Wuninitialized -O2 --param 
> > > logical-op-non-short-circuit=1" } */
> > >
> > >  int g;
> > >  void bar();
>
> Jakub


Re: [PATCH] Adjust gcc.dg/uninit-pred-8_b.c (PR89551)

2019-03-14 Thread Richard Biener
On Thu, 14 Mar 2019, Christophe Lyon wrote:

> On Thu, 14 Mar 2019 at 15:35, Jakub Jelinek  wrote:
> >
> > On Thu, Mar 14, 2019 at 03:32:39PM +0100, Christophe Lyon wrote:
> > > > 2019-03-04  Richard Biener  
> > > >
> > > > PR testsuite/89551
> > > > * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit
> > > > the way that makes the testcase PASS.
> > >
> > > Hi Richard,
> > >
> > > I think you forgot to backport this to gcc-8-branch when you committed 
> > > r269650?
> >
> > That param is not supported in 8.x or older.
> 
> OK. I noticed this because I saw the same regressions I reported on
> trunk on some arm configs:
> https://gcc.gnu.org/ml/gcc-patches/2019-03/msg00125.html

I will backport the param and the patch tomorrow unless somebody beats me.
It's just a testsuite issue after all.

Richard.