[PATCH] Flag to enable IEEE-754 friendly FP optimizations

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Thu Jan 22 10:23:19 PST 2015


On Thu, Jan 22, 2015 at 08:40:15AM -0800, Stephen Canon wrote:
>
> > On Dec 22, 2014, at 4:36 AM, Sergey Dmitrouk <sdmitrouk at accesssoftek.com> wrote:
> >
> > At the moment rounding flag just
> > disables folding, I'm not sure how to actually check that result of
> > operation doesn't depend on rounding mode.  This prevents early
> > optimization for something like "1.0 + 2.0", so might need adjustments
> > if there is a way to check whether rounding is important for particular
> > operation.
>
> This piece is actually straightforward.  A result is affected by the rounding mode if and only if inexact is raised (otherwise, the result is exact, and therefore no rounding occurred, which means that the rounding mode can’t have any effect).

Thank you, Steve.  Will change that.  Now that you explained it seems
obvious, but I somehow skipped exceptions while thinking about tests for
rounding before.

> – Steve

-- 
Sergey




More information about the llvm-commits mailing list