summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-11-15 19:56:03 +0100
committerMarek Olšák <[email protected]>2016-11-15 20:22:28 +0100
commit5b8876609ec526cd407e86b50bf8587ddb5bbacd (patch)
tree9ebc9472be112140f6732a89c330fec9d8c86f07 /src/gallium
parent341fc0073a3c05fd43e9c7a33613bcb881f25f33 (diff)
gallivm: limit use of setFastMathFlags to LLVM 3.8 and later
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index da3cbdd53c5..a68428d5d3b 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -739,11 +739,13 @@ lp_create_builder(LLVMContextRef ctx, bool unsafe_fpmath)
{
LLVMBuilderRef builder = LLVMCreateBuilderInContext(ctx);
+#if HAVE_LLVM >= 0x0308
if (unsafe_fpmath) {
llvm::FastMathFlags flags;
flags.setUnsafeAlgebra();
llvm::unwrap(builder)->setFastMathFlags(flags);
}
+#endif
return builder;
}