[PATCH] use -0.0 when creating an fneg instruction
Chris Lattner
clattner at apple.com
Thu Dec 18 21:11:42 PST 2014
> 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
More information about the llvm-commits
mailing list