x86_64 assembly pack: allow clang to compile AVX code.
[openssl.git] / crypto / sha / asm / sha256-586.pl
index ee094a92147fa817380a89c7786a923e45da6596..75f792495cfa442755b2bbf3697b9b038ac6a5b7 100644 (file)
@@ -82,6 +82,10 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" &&
        $avx = ($1>=10) + ($1>=11);
 }
 
+if ($xmm && !$avx && `$ENV{CC} -v` =~ /LLVM ([3-9]\.[0-9]+)/) {
+       $avx = ($1>=3.0) + ($1>=3.1);
+}
+
 $shaext=$xmm;  ### set to zero if compiling for 1.0.1
 
 $unroll_after = 64*4;  # If pre-evicted from L1P cache first spin of