Skip to content

Commit 4e4b57e

Browse files
Minor compilation efficiency thing
Doesn't affect runtime behavior
1 parent e66aed9 commit 4e4b57e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/aarch64/aesni_common.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else
2323
uint64x2((VecElement(hi), VecElement(lo)))
2424
end
2525

26-
@inline Base.zero(::Type{uint64x2}) = convert(uint64x2, 0)
26+
@inline Base.zero(::Type{uint64x2}) = convert(uint64x2, zero(UInt128))
2727
@inline Base.one(::Type{uint64x2}) = uint64x2(zero(UInt64), one(UInt64))
2828
@inline Base.xor(a::uint64x2, b::uint64x2) = llvmcall(
2929
"""%3 = xor <2 x i64> %1, %0
@@ -63,7 +63,7 @@ end
6363
return uint8x16(bytes_vec)
6464
end
6565

66-
@inline Base.zero(::Type{uint8x16}) = convert(uint8x16, 0)
66+
@inline Base.zero(::Type{uint8x16}) = convert(uint8x16, zero(UInt128))
6767
@inline Base.xor(a::uint8x16, b::uint8x16) = llvmcall(
6868
"""%3 = xor <16 x i8> %1, %0
6969
ret <16 x i8> %3""",
@@ -99,7 +99,7 @@ end
9999
return uint32x4(bytes_vec)
100100
end
101101

102-
@inline Base.zero(::Type{uint32x4}) = convert(uint32x4, 0)
102+
@inline Base.zero(::Type{uint32x4}) = convert(uint32x4, zero(UInt128))
103103
@inline Base.xor(a::uint32x4, b::uint32x4) = llvmcall(
104104
"""%3 = xor <4 x i32> %1, %0
105105
ret <4 x i32> %3""",

0 commit comments

Comments
 (0)