Re: [PATCH] Disallow minus in mem {+,-,&,|,^}= x; mem != 0 peepholes (PR target/85756)

2018-05-14 Thread Uros Bizjak
On Mon, May 14, 2018 at 5:08 PM, Marek Polacek wrote: > On Mon, May 14, 2018 at 03:07:54PM +0200, Jakub Jelinek wrote: >> On Mon, May 14, 2018 at 02:54:18PM +0200, Uros Bizjak wrote: >> > > --- gcc/config/i386/i386.md.jj 2018-05-11 18:44:32.0 +0200 >> > > +++

Re: [PATCH] Disallow minus in mem {+,-,&,|,^}= x; mem != 0 peepholes (PR target/85756)

2018-05-14 Thread Marek Polacek
On Mon, May 14, 2018 at 03:07:54PM +0200, Jakub Jelinek wrote: > On Mon, May 14, 2018 at 02:54:18PM +0200, Uros Bizjak wrote: > > > --- gcc/config/i386/i386.md.jj 2018-05-11 18:44:32.0 +0200 > > > +++ gcc/config/i386/i386.md 2018-05-14 13:50:28.100482520 +0200 > > > @@ -19397,11

Re: [PATCH] Disallow minus in mem {+,-,&,|,^}= x; mem != 0 peepholes (PR target/85756)

2018-05-14 Thread Jakub Jelinek
On Mon, May 14, 2018 at 02:54:18PM +0200, Uros Bizjak wrote: > > --- gcc/config/i386/i386.md.jj 2018-05-11 18:44:32.0 +0200 > > +++ gcc/config/i386/i386.md 2018-05-14 13:50:28.100482520 +0200 > > @@ -19397,11 +19397,11 @@ > > (set (match_dup 0) (match_dup 2))]) > >

Re: [PATCH] Disallow minus in mem {+,-,&,|,^}= x; mem != 0 peepholes (PR target/85756)

2018-05-14 Thread Uros Bizjak
On Mon, May 14, 2018 at 2:48 PM, Jakub Jelinek wrote: > Hi! > > The last peephole I've recently added is as the testcase shows fundamentally > incompatible with non-commutative operations, because we need to swap the > operands. > > The pattern right before this one already is:

Re: [PATCH] Disallow minus in mem {+,-,&,|,^}= x; mem != 0 peepholes (PR target/85756)

2018-05-14 Thread Uros Bizjak
On Mon, May 14, 2018 at 2:48 PM, Jakub Jelinek wrote: > Hi! > > The last peephole I've recently added is as the testcase shows fundamentally > incompatible with non-commutative operations, because we need to swap the > operands. > > The pattern right before this one already is: