[Mesa-dev] [PATCH 2/2] gallivm: permit use of avx512 instructions on llvm-3.9+

Tim Rowley timothy.o.rowley at intel.com
Thu Nov 3 21:29:12 UTC 2016


---
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index bd4d4d3..bff2198 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -583,6 +583,8 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
       MAttrs.push_back("-fma");
    }
    MAttrs.push_back(util_cpu_caps.has_avx2 ? "+avx2" : "-avx2");
+
+#if HAVE_LLVM <= 0x0308
    /* disable avx512 and all subvariants */
 #if HAVE_LLVM >= 0x0304
    MAttrs.push_back("-avx512cd");
@@ -596,6 +598,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
    MAttrs.push_back("-avx512vl");
 #endif
 #endif
+#endif
 
 #if defined(PIPE_ARCH_PPC)
    MAttrs.push_back(util_cpu_caps.has_altivec ? "+altivec" : "-altivec");
-- 
2.9.3



More information about the mesa-dev mailing list