diff options
author | Tobias Droste <tdroste@gmx.de> | 2017-11-08 10:44:19 +0100 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2017-11-08 10:44:19 +0100 |
commit | 5d61fa4e68b7eb6d481a37efdbb35fdce675a6ad (patch) | |
tree | 6210b5836b1da25bdda9f2d5aaa372ece35c5342 /src/gallium | |
parent | d5a641106baae2122cc3f09b4a755077d902ee88 (diff) |
gallivm: Use new LLVM fast-math-flags API
LLVM 6 changed the API on the fast-math-flags:
https://reviews.llvm.org/rL317488
NOTE: This also enables the new flag 'ApproxFunc' to allow for
approximations for library functions (sin, cos, ...). I'm not completly
convinced, that this is something mesa should do.
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index d988910a7eb..13194072902 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -830,7 +830,11 @@ lp_create_builder(LLVMContextRef ctx, enum lp_float_mode float_mode) llvm::unwrap(builder)->setFastMathFlags(flags); break; case LP_FLOAT_MODE_UNSAFE_FP_MATH: +#if HAVE_LLVM >= 0x0600 + flags.setFast(); +#else flags.setUnsafeAlgebra(); +#endif llvm::unwrap(builder)->setFastMathFlags(flags); break; } |