[LLVMdev] Signed NaNs in APFloat arithmetic
Tim Northover
t.p.northover at gmail.com
Fri Aug 8 01:34:52 PDT 2014
On 7 August 2014 20:52, Keno Fischer <kfischer at college.harvard.edu> wrote:
> One more update: Since the code generated by the bitcast wasn't ideal
> and we were afraid to loose vectorization, etc., we ended up going
> with fsub -0.0, x, which for some reason unlike fsub 0.0, x, seems to
> be have appropriately at all optimization levels.
That's because "fsub 0.0, x" is incorrect for x=+0.0. Took me a while
to work out why the "obvious" choice didn't work the first time I
encountered it too.
Cheers.
Tim.
More information about the llvm-dev
mailing list