OSDN Git Service

Disable unsafe FP math optimizations for LLVM 7.0.
authorNicolas Capens <capn@google.com>
Thu, 13 Sep 2018 18:20:06 +0000 (14:20 -0400)
committerNicolas Capens <nicolascapens@google.com>
Thu, 13 Sep 2018 21:46:47 +0000 (21:46 +0000)
Failures in dEQP using SwiftShader with LLVM 7.0 were caused by unsafe
floating point math optimizations, which are more aggressive than with
LLVM 3.0.

Bug b/115344057

Change-Id: Idf564d0193efba37cd1192a188b18a5f8b4ed4f7
Reviewed-on: https://swiftshader-review.googlesource.com/20708
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Shannon Woods <shannonwoods@google.com>
src/Reactor/LLVMReactor.cpp

index e033a18..544290b 100644 (file)
@@ -767,7 +767,7 @@ namespace sw
                // llvm::NoNaNsFPMath = true;
 #else
                llvm::TargetOptions targetOpts;
-               targetOpts.UnsafeFPMath = true;
+               targetOpts.UnsafeFPMath = false;
                // targetOpts.NoInfsFPMath = true;
                // targetOpts.NoNaNsFPMath = true;
 #endif