Skip to content

Commit

Permalink
AVX not defined in VectorizationBase for Julia with LLVM < 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Jul 20, 2020
1 parent 5b82e4f commit 5755bd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sleef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/xsimd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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>)
Expand Down

4 comments on commit 5755bd8

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/18212

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.5 -m "<description of version>" 5755bd8c6f03c3eae17454c681b1e18991ac636b
git push origin v0.5.5

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/18212

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.5 -m "<description of version>" 5755bd8c6f03c3eae17454c681b1e18991ac636b
git push origin v0.5.5

Please sign in to comment.