This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR77644


On Wed, 10 May 2017, Prathamesh Kulkarni wrote:

> On 10 May 2017 at 14:28, Richard Biener <rguenther@suse.de> wrote:
> > On Tue, 9 May 2017, Prathamesh Kulkarni wrote:
> >
> >> Hi,
> >> The attached patch adds the following pattern to match.pd
> >> sqrt(x) cmp sqrt(y) -> x cmp y.
> >> and is enabled with -funsafe-math-optimization and -fno-math-errno.
> >>
> >> Bootstrapped+tested on x86_64-unknown-linux-gnu.
> >> Cross-tested on arm*-*-*, aarch64*-*-*.
> >> OK for trunk ?
> >
> > +          (cmp @0 { build_real (TREE_TYPE (@0), c2); })))))))))
> > +
> > +   /* PR77644: Transform sqrt(x) cmp sqrt(y) -> x cmp y.  */
> >
> > Do not reference PRs here please (and omit the vertical space before
> > the sub-pattern.
> >
> > +   (simplify
> > +    (cmp (sq @0) (sq @1))
> > +      (if (! HONOR_NANS (type))
> > +       (cmp @0 @1))))))
> >
> > It should be HONOR_NANS (@0), and not on 'type' (that's bool!).
> Ah indeed, sorry about that :/
> Does the attached version look OK ?

Yes.

Thanks,
Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]