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

Stephen Canon scanon at apple.com
Thu Jan 22 08:40:15 PST 2015


> 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).

– Steve



More information about the llvm-commits mailing list