Reviewed-by: Brian Paul <brianp@vmware.com>tags/17.0-branchpoint
@@ -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; | |||
} |