Skip to content

Commit fba12ad

Browse files
committed
Enable AArch64 arithmetic on LLVM 19.
1 parent 2266cc5 commit fba12ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bfloat16.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Printf
2222
# However, not all LLVM targets support `bfloat`. If the target can store/load BFloat16s
2323
# (and supports synthesizing constants) we can use the `bfloat` IR type, otherwise we fall
2424
# back to defining a primitive type that will be represented as an `i16`. If, in addition,
25-
# the target supports BFloat16 arithmetic, we can use LLVM intrinsics.
25+
# the target supports BFloat16 arithmetic, we can use LLVM instructions.
2626
# - x86: storage and arithmetic support in LLVM 15
2727
# - aarch64: storage support in LLVM 17
2828
const llvm_storage = if isdefined(Core, :BFloat16)
@@ -40,6 +40,8 @@ const llvm_arithmetic = if llvm_storage
4040
using Core: BFloat16
4141
if Sys.ARCH in [:x86_64, :i686] && Base.libllvm_version >= v"15"
4242
true
43+
elseif Sys.ARCH == :aarch64 && Base.libllvm_version >= v"19"
44+
true
4345
else
4446
false
4547
end

0 commit comments

Comments
 (0)