Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-20 Thread Richard Biener
On Tue, Sep 20, 2016 at 1:32 AM, kugan wrote: > Hi Richard, > Thanks for the review. > > > On 19/09/16 23:40, Richard Biener wrote: >> >> On Sun, Sep 18, 2016 at 10:21 PM, kugan >> wrote: >>> >>> Hi Richard, >>> >>> >>> On 14/09/16 21:31, Richard Biener wrote: On Fri, Sep 2, 2016 a

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-19 Thread kugan
Hi Richard, Thanks for the review. On 19/09/16 23:40, Richard Biener wrote: On Sun, Sep 18, 2016 at 10:21 PM, kugan wrote: Hi Richard, On 14/09/16 21:31, Richard Biener wrote: On Fri, Sep 2, 2016 at 10:09 AM, Kugan Vivekanandarajah wrote: Hi Richard, On 25 August 2016 at 22:24, Richard

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-19 Thread Richard Biener
On Sun, Sep 18, 2016 at 10:21 PM, kugan wrote: > Hi Richard, > > > On 14/09/16 21:31, Richard Biener wrote: >> >> On Fri, Sep 2, 2016 at 10:09 AM, Kugan Vivekanandarajah >> wrote: >>> >>> Hi Richard, >>> >>> On 25 August 2016 at 22:24, Richard Biener >>> wrote: On Thu, Aug 11, 2016 at

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-18 Thread kugan
Hi Richard, On 14/09/16 21:31, Richard Biener wrote: On Fri, Sep 2, 2016 at 10:09 AM, Kugan Vivekanandarajah wrote: Hi Richard, On 25 August 2016 at 22:24, Richard Biener wrote: On Thu, Aug 11, 2016 at 1:09 AM, kugan wrote: Hi, On 10/08/16 20:28, Richard Biener wrote: On Wed, Aug 10,

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-14 Thread Georg-Johann Lay
On 09.08.2016 15:43, kugan wrote: Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as follows, which looks OK. + unsigned int _16; + unsigned int _17; + u

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-14 Thread Richard Biener
On Fri, Sep 2, 2016 at 10:09 AM, Kugan Vivekanandarajah wrote: > Hi Richard, > > On 25 August 2016 at 22:24, Richard Biener wrote: >> On Thu, Aug 11, 2016 at 1:09 AM, kugan >> wrote: >>> Hi, >>> >>> >>> On 10/08/16 20:28, Richard Biener wrote: On Wed, Aug 10, 2016 at 10:57 AM, Jakub Je

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-02 Thread Kugan Vivekanandarajah
Hi Richard, On 25 August 2016 at 22:24, Richard Biener wrote: > On Thu, Aug 11, 2016 at 1:09 AM, kugan > wrote: >> Hi, >> >> >> On 10/08/16 20:28, Richard Biener wrote: >>> >>> On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-25 Thread Richard Biener
On Thu, Aug 11, 2016 at 1:09 AM, kugan wrote: > Hi, > > > On 10/08/16 20:28, Richard Biener wrote: >> >> On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: >>> >>> On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: I see it now. The problem is we are just looking at (-1) being i

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-19 Thread Kugan Vivekanandarajah
Ping? https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00872.html Thanks, Kugan On 11 August 2016 at 09:09, kugan wrote: > Hi, > > > On 10/08/16 20:28, Richard Biener wrote: >> >> On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: >>> >>> On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote:

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread kugan
Hi, On 10/08/16 20:28, Richard Biener wrote: On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: I see it now. The problem is we are just looking at (-1) being in the ops list for passing changed to rewrite_expr_tree in the case of mul

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread Richard Biener
On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: > On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: >> I see it now. The problem is we are just looking at (-1) being in the ops >> list for passing changed to rewrite_expr_tree in the case of multiplication >> by negate. If we have comb

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread kugan
On 10/08/16 18:57, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: I see it now. The problem is we are just looking at (-1) being in the ops list for passing changed to rewrite_expr_tree in the case of multiplication by negate. If we have combined (-1), as in the t

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread Jakub Jelinek
On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: > I see it now. The problem is we are just looking at (-1) being in the ops > list for passing changed to rewrite_expr_tree in the case of multiplication > by negate. If we have combined (-1), as in the testcase, we will not have > the (-1) an

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
On 10/08/16 08:51, kugan wrote: Hi Jakub, On 10/08/16 07:55, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:51:08AM +1000, kugan wrote: On 10/08/16 07:46, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: There was no new regression while testing. I also moved th

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi Jakub, On 10/08/16 07:55, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:51:08AM +1000, kugan wrote: On 10/08/16 07:46, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: There was no new regression while testing. I also moved the testcase from gcc.dg/torture/pr72

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread Jakub Jelinek
On Wed, Aug 10, 2016 at 07:51:08AM +1000, kugan wrote: > On 10/08/16 07:46, Jakub Jelinek wrote: > >On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: > >>There was no new regression while testing. I also moved the testcase from > >>gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is this

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi Andrew, On 10/08/16 07:50, Andrew Pinski wrote: On Tue, Aug 9, 2016 at 2:42 PM, kugan wrote: On 09/08/16 23:43, kugan wrote: Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi Jakub, On 10/08/16 07:46, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: There was no new regression while testing. I also moved the testcase from gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is this OK for trunk? This looks strange. The tree-ssa-rea

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread Andrew Pinski
On Tue, Aug 9, 2016 at 2:42 PM, kugan wrote: > > > On 09/08/16 23:43, kugan wrote: >> >> Hi, >> >> The test-case in PR72835 is failing with -O2 and passing with >> -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. >> >> diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as >> fo

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread Jakub Jelinek
On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: > There was no new regression while testing. I also moved the testcase from > gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is this OK for trunk? This looks strange. The tree-ssa-reassoc.c code has been trying to never reuse SSA_NAME

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
On 09/08/16 23:43, kugan wrote: Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as follows, which looks OK. + unsigned int _16; + unsigned int _17; + u

[PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as follows, which looks OK. + unsigned int _16; + unsigned int _17; + unsigned int _18; : _1 =