diff --git a/src/sleef.jl b/src/sleef.jl index 865fb22..1aebf6d 100644 --- a/src/sleef.jl +++ b/src/sleef.jl @@ -339,7 +339,8 @@ end # end @static if Base.libllvm_version ≥ v"9" - @static if SIMDPirates.VectorizationBase.AVX & SIMDPirates.VectorizationBase.FMA + @static if SIMDPirates.VectorizationBase.FMA & (SIMDPirates.VectorizationBase.REGISTER_SIZE ≥ 32) # In earlier Julia versions, AVX will not be defined + # SIMDPirates.VectorizationBase.AVX & @inline function tanh(v::Vec{8,Float32}) Base.llvmcall((""" declare i32 @llvm.x86.avx.vtestz.ps.256(<8 x float>, <8 x float>) #16 diff --git a/src/xsimd.jl b/src/xsimd.jl index ad5ef76..be931d0 100644 --- a/src/xsimd.jl +++ b/src/xsimd.jl @@ -90,7 +90,7 @@ if Sys.ARCH === :x86_64 end end -if SIMDPirates.VectorizationBase.AVX +if Sys.ARCH === :x86_64 && SIMDPirates.VectorizationBase.REGISTER_SIZE ≥ 32 # In earlier Julia versions, AVX will not be defined @inline function Base.expm1(v::SVec{4,Float64}) SVec(Base.llvmcall((""" declare <4 x double> @llvm.fmuladd.v4f64(<4 x double>, <4 x double>, <4 x double>)