[llvm-dev] Trouble when suppressing a portion of fast-math-transformations

Bruce Hoult via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 3 02:05:13 PDT 2017


On Tue, Oct 3, 2017 at 4:03 AM, Hal Finkel via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On 10/02/2017 11:10 AM, Bruce Hoult via llvm-dev wrote:
>
> -cl-fast-relaxed-math
>
> Sets the optimization options -cl-finite-math-only and
> -cl-unsafe-math-optimizations. This allows optimizations for floating-point
> arithmetic that may violate the IEEE 754 standard and the OpenCL numerical
> compliance requirements for single precision and double precision
> floating-point, as well as floating point edge case behavior. This option
> also relaxes the precision of commonly used math functions. This option
> causes the preprocessor macro __FAST_RELAXED_MATH__ to be defined in the
> OpenCL program. The original and modified values are defined in the SPIR-V
> OpenCL environment specification
>
> I'd like to emphasise in the latter one: "This option also relaxes the
> precision of commonly used math functions."
>
> Isn't this the "libm" flag that is proposed in this thread?
>

I don't know. I didn't see any definition of it.

In my case I'm talking about allowing the use of lower precision but very
fast machine instructions instead of a slow sequence of inline
instructions. But I guess instruction vs library is equivalent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171003/ab8cc941/attachment.html>


More information about the llvm-dev mailing list