From 50f4e6ba8ada4e0cc34448ff22ec38d7405b6885 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 16 May 2012 13:42:53 +0200 Subject: Blacklist Apple clang 3.0 and previous support for AVX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In at least one case found in our testfarm, the compiler runs into an ICE (Internal Compiler Error) compiling the new AVX code. The error it reported was: fatal error: error in backend: Cannot select: 0x7fbf1aa42210: f64 = sint_to_fp 0x7fbf1aa88a10 [ORD=1936] [ID=37] 0x7fbf1aa88a10: i32,ch = CopyFromReg 0x7fbf19538768, 0x7fbf1a9f2610 [ORD=1936] [ID=27] 0x7fbf1a9f2610: i32 = Register %vreg38 [ORD=1936] [ID=9] As is the nature of ICEs, juggling the code around will probably make it pass. But since I have plenty more AVX changes pending, which make the code even more complex, it's also very likely that this issue will happen in other places. For that reason, I choose to blacklist the compiler instead. Change-Id: Ide3201f0cc49c7ceb63e966f6de65a8315cbea4b Reviewed-by: Samuel Rødal Reviewed-by: Morten Johan Sørvig --- configure | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/configure b/configure index a79c03be54..2923e6544b 100755 --- a/configure +++ b/configure @@ -3720,13 +3720,34 @@ fi # detect avx support if [ "${CFG_AVX}" = "auto" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then - CFG_AVX=yes + case "$XQMAKESPEC" in + *g++*|*-clang*) + # Some clang versions produce internal compiler errors compiling Qt AVX code + case `$TEST_COMPILER --version` in + Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*) + CFG_AVX=no + if [ "$OPT_VERBOSE" = "yes" ]; then + echo 'AVX support disabled for blacklisted clang compiler' + fi + ;; + *) + CFG_AVX=yes + ;; + esac + ;; + *) + CFG_AVX=yes + ;; + esac else CFG_AVX=no fi fi # detect avx2 support +if [ "${CFG_AVX}" = "no" ]; then + CFG_AVX2=no +fi if [ "${CFG_AVX2}" = "auto" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx2 "avx2" $L_FLAGS $I_FLAGS $l_FLAGS "-march=core-avx2"; then CFG_AVX2=yes -- cgit v1.2.3