Re: [PATCH] Fix floating point handling in dom (PR tree-optimization/84235)

2018-02-07 Thread Jeff Law
On 02/07/2018 12:06 AM, Richard Biener wrote: > On February 6, 2018 9:40:37 PM GMT+01:00, Jakub Jelinek > wrote: >> Hi! >> >> As the following testcase shows, dom2 miscompiles floating point x - x >> into 0.0 even when x could be infinity and x - x then a NaN. >> The corresponding match.pd optimi

Re: [PATCH] Fix floating point handling in dom (PR tree-optimization/84235)

2018-02-07 Thread Richard Biener
On Wed, 7 Feb 2018, Jakub Jelinek wrote: > On Wed, Feb 07, 2018 at 08:06:53AM +0100, Richard Biener wrote: > > >Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > OK. > > Committed, thanks. > > > I wonder why we have to re-implement all this in DOM. there's enough of

Re: [PATCH] Fix floating point handling in dom (PR tree-optimization/84235)

2018-02-07 Thread Jakub Jelinek
On Wed, Feb 07, 2018 at 08:06:53AM +0100, Richard Biener wrote: > >Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > OK. Committed, thanks. > I wonder why we have to re-implement all this in DOM. there's enough of > match and simplify interfaces to make it use that? It

Re: [PATCH] Fix floating point handling in dom (PR tree-optimization/84235)

2018-02-06 Thread Richard Biener
On February 6, 2018 9:40:37 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >As the following testcase shows, dom2 miscompiles floating point x - x >into 0.0 even when x could be infinity and x - x then a NaN. >The corresponding match.pd optimization is: >/* Simplify x - x. > This is unsafe for certa