mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 13:30:11 +01:00
gallivm: limit use of setFastMathFlags to LLVM 3.8 and later
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
341fc0073a
commit
5b8876609e
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue