[PATCH] use -0.0 when creating an fneg instruction

Sanjay Patel spatel at rotateright.com
Fri Dec 19 08:51:46 PST 2014


Thanks, Chris! Checked in at r224583.

On Thu, Dec 18, 2014 at 10:11 PM, Chris Lattner <clattner at apple.com> wrote:
>
>
> > On Dec 18, 2014, at 10:31 AM, Sanjay Patel <spatel at rotateright.com>
> wrote:
> >
> > Hi hfinkel, resistor,
> >
> > Simple (I hope) bug fix when generating an fneg operation in
> InstCombine. Backends recognize (-0.0 - X) as the canonical form for fneg
> and produce better code. Eg, ppc64 with 0.0:
> >   lis r2, ha16(LCPI0_0)
> >   lfs f0, lo16(LCPI0_0)(r2)
> >   fsubs f1, f0, f1
> >   blr
> >
> > Vs. -0.0:
> >   fneg f1, f1
> >   blr
> >
> > http://reviews.llvm.org/D6723
>
> LGTM.
>
> -Chris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141219/8a3d23ca/attachment.html>


More information about the llvm-commits mailing list