[Mesa-dev] [PATCH 08/10] radeonsi: re-enable unsafe-fp-math for LLVM 3.8

Marek Olšák maraeo at gmail.com
Sun Oct 11 04:08:50 PDT 2015


On Sun, Oct 11, 2015 at 4:12 AM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> FWIW, this isn't quite correct with ARB_shader_precision or GL4.1 --
> it specifies that infinities should be correctly generated through
> division by 0, which unsafe-fp-math doesn't guarantee. At least,
> that's assuming this is similar to the "fast" per-instruction flag
> (http://llvm.org/docs/LangRef.html#fast-math-flags) which says "This
> flag implies all the others."

We don't use the per-instruction flags yet.

Sadly, we need this flag to be able to get (1/sqrt) -> RSQ and (1/x)
-> RCP. LLVM doesn't have standard intrinsics for those instructions,
so we have to unwind them and rely on LLVM to combine them. Without
it, the TGSI->LLVM conversion would produce worse code.

Marek


More information about the mesa-dev mailing list