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 <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
# 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