[PATCH] Flag to enable IEEE-754 friendly FP optimizations
sdmitrouk at accesssoftek.com
Wed Feb 4 08:09:36 PST 2015
On Fri, Jan 23, 2015 at 05:51:07PM +0200, Sergey Dmitrouk wrote:
> Please find updated patches in the attachment. Changes:
> - rounding is checked via inexact exception;
> - added changes for "frem" instruction, which was absent in several places;
> - updated some of tests (to account changes in rounding and fix wrong
> For the purpose of possibly saving some time there is also changes.diff with
> the difference from the previous version of the patch set.
> Best regards,
> On Thu, Jan 22, 2015 at 08:23:19PM +0200, Sergey Dmitrouk wrote:
> > 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