Re: Simplify ptr - 0

2017-11-24 Thread Richard Biener
On Fri, Nov 24, 2017 at 10:18 AM, Marc Glisse wrote: > On Thu, 23 Nov 2017, Richard Biener wrote: > >> What about 0 - ptr? (ok, that's even more weird) > > > * match.pd (0-ptr): New transformation. > > Regtested on gcc112. Ok. Thanks, Richard. > -- > Marc Glisse > Index: gcc/match.pd >

Re: Simplify ptr - 0

2017-11-24 Thread Marc Glisse
On Thu, 23 Nov 2017, Richard Biener wrote: What about 0 - ptr? (ok, that's even more weird) * match.pd (0-ptr): New transformation. Regtested on gcc112. -- Marc GlisseIndex: gcc/match.pd === --- gcc/match.pd (revision 2

Re: Simplify ptr - 0

2017-11-23 Thread Marc Glisse
On Thu, 23 Nov 2017, Richard Biener wrote: On Wed, Nov 22, 2017 at 6:34 PM, Marc Glisse wrote: Hello, I hadn't implemented this simplification because I think it is invalid code, but apparently people do write it, so we might as well handle it sensibly. This also happens to work around PR 831

Re: Simplify ptr - 0

2017-11-23 Thread Richard Biener
On Wed, Nov 22, 2017 at 6:34 PM, Marc Glisse wrote: > Hello, > > I hadn't implemented this simplification because I think it is invalid code, > but apparently people do write it, so we might as well handle it sensibly. > This also happens to work around PR 83104 (already fixed). > > bootstrap+regt

Re: Simplify ptr - 0

2017-11-22 Thread Marc Glisse
On Wed, 22 Nov 2017, Jakub Jelinek wrote: On Wed, Nov 22, 2017 at 06:34:08PM +0100, Marc Glisse wrote: Hello, I hadn't implemented this simplification because I think it is invalid code, but apparently people do write it, so we might as well handle it sensibly. This also happens to work around

Re: Simplify ptr - 0

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 06:34:08PM +0100, Marc Glisse wrote: > Hello, > > I hadn't implemented this simplification because I think it is invalid code, > but apparently people do write it, so we might as well handle it sensibly. > This also happens to work around PR 83104 (already fixed). > > boot

Simplify ptr - 0

2017-11-22 Thread Marc Glisse
Hello, I hadn't implemented this simplification because I think it is invalid code, but apparently people do write it, so we might as well handle it sensibly. This also happens to work around PR 83104 (already fixed). bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2017-11-22 Marc Gliss