Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-16 Thread Richard Biener
On Mon, 15 Feb 2016, Richard Sandiford wrote: > Richard Biener writes: > > On Wed, 10 Feb 2016, Bernd Schmidt wrote: > > > >> On 02/10/2016 02:50 PM, Richard Biener wrote: > >> > On Wed, 10 Feb 2016, Bernd Schmidt wrote: > >> > > >> > > On 02/10/2016 02:35 PM, Richard Biener wrote: > >> > > > >

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-15 Thread Richard Sandiford
Richard Biener writes: > On Wed, 10 Feb 2016, Bernd Schmidt wrote: > >> On 02/10/2016 02:50 PM, Richard Biener wrote: >> > On Wed, 10 Feb 2016, Bernd Schmidt wrote: >> > >> > > On 02/10/2016 02:35 PM, Richard Biener wrote: >> > > >> > > > Index: gcc/ifcvt.c >> > > > =

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-11 Thread Bernd Schmidt
On 02/10/2016 03:03 PM, Richard Biener wrote: Ok, the following is in testing now. Ok? Thanks, Richard. 2016-02-10 Richard Biener PR rtl-optimization/69291 * ifcvt.c (noce_try_store_flag_constants): Do not allow subexpressions affected by changing the result. Ok

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Richard Biener
On Wed, 10 Feb 2016, Bernd Schmidt wrote: > On 02/10/2016 02:50 PM, Richard Biener wrote: > > On Wed, 10 Feb 2016, Bernd Schmidt wrote: > > > > > On 02/10/2016 02:35 PM, Richard Biener wrote: > > > > > > > Index: gcc/ifcvt.c > > > > ===

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Bernd Schmidt
On 02/10/2016 02:50 PM, Richard Biener wrote: On Wed, 10 Feb 2016, Bernd Schmidt wrote: On 02/10/2016 02:35 PM, Richard Biener wrote: Index: gcc/ifcvt.c === --- gcc/ifcvt.c (revision 233262) +++ gcc/ifcvt.c (working copy) @@ -127

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Richard Biener
On Wed, 10 Feb 2016, Bernd Schmidt wrote: > On 02/10/2016 02:35 PM, Richard Biener wrote: > > > Index: gcc/ifcvt.c > > === > > --- gcc/ifcvt.c (revision 233262) > > +++ gcc/ifcvt.c (working copy) > > @@ -1274,7 +1274,8 @@ noce_try_st

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Bernd Schmidt
On 02/10/2016 02:35 PM, Richard Biener wrote: Index: gcc/ifcvt.c === --- gcc/ifcvt.c (revision 233262) +++ gcc/ifcvt.c (working copy) @@ -1274,7 +1274,8 @@ noce_try_store_flag_constants (struct no && CONST_INT_P (XEXP (a, 1)

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Bernd Schmidt
On 02/10/2016 02:33 PM, Richard Biener wrote: But if you prefer I can instead test the following Index: gcc/ifcvt.c === --- gcc/ifcvt.c (revision 233262) +++ gcc/ifcvt.c (working copy) @@ -1274,7 +1274,7 @@ noce_try_store_flag_cons

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Richard Biener
On Wed, 10 Feb 2016, Richard Biener wrote: > On Wed, 10 Feb 2016, Bernd Schmidt wrote: > > > On 02/10/2016 02:04 PM, Richard Biener wrote: > > > where noce_try_store_flag_constants identifies > > > > > > (plus:SI (reg/v:SI 160 [ mod_tlen ]) > > > (reg/v:SI 224 [ ])) > > > > > > as "c

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Richard Biener
On Wed, 10 Feb 2016, Bernd Schmidt wrote: > On 02/10/2016 02:04 PM, Richard Biener wrote: > > where noce_try_store_flag_constants identifies > > > > (plus:SI (reg/v:SI 160 [ mod_tlen ]) > > (reg/v:SI 224 [ ])) > > > > as "common" and then tries to detect the case where setting the > >

Re: [PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Bernd Schmidt
On 02/10/2016 02:04 PM, Richard Biener wrote: where noce_try_store_flag_constants identifies (plus:SI (reg/v:SI 160 [ mod_tlen ]) (reg/v:SI 224 [ ])) as "common" and then tries to detect the case where setting the result would clobber that value. It doesn't seem to expect anything e

[PATCH] Fix PR69291, RTL if-conversion bug

2016-02-10 Thread Richard Biener
In this case if-conversion sees if () (set (reg/v:SI 224 [ ]) (plus:SI (plus:SI (reg/v:SI 160 [ mod_tlen ]) (reg/v:SI 224 [ ])) (const_int 11 [0xb]) else (set (reg/v:SI 224 [ ]) (plus:SI (plus:SI (reg/v:SI 160 [ mod_tlen ]) (reg