[Mesa-dev] [PATCH 08/10] radeonsi: re-enable unsafe-fp-math for LLVM 3.8
cwabbott0 at gmail.com
Sun Oct 11 07:25:56 PDT 2015
On Sun, Oct 11, 2015 at 7:08 AM, Marek Olšák <maraeo at gmail.com> wrote:
> 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.
Right, but you're also allowing transforms which GLSL explicitly
disallows. It sounds like you need more precise control than what LLVM
More information about the mesa-dev