summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_misc.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 805a50b..5ffe09c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -570,6 +570,15 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
*/
MAttrs.push_back(util_cpu_caps.has_avx ? "+avx" : "-avx");
MAttrs.push_back(util_cpu_caps.has_f16c ? "+f16c" : "-f16c");
+ if (HAVE_LLVM >= 0x0304 || useMCJIT) {
+ MAttrs.push_back(util_cpu_caps.has_fma ? "+fma" : "-fma");
+ } else {
+ /*
+ * The old JIT in LLVM 3.3 has a bug encoding llvm.fmuladd.f32 and
+ * llvm.fmuladd.v2f32 intrinsics when FMA is available.
+ */
+ MAttrs.push_back("-fma");
+ }
MAttrs.push_back(util_cpu_caps.has_avx2 ? "+avx2" : "-avx2");
/* disable avx512 and all subvariants */
#if HAVE_LLVM >= 0x0304