Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 1.10 for x86 #1231

Merged
merged 2 commits into from
Jan 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,14 @@ function julia_allocator(B, LLVMType, Count, AlignedSize, IsDefault, ZI)
needs_dynamic_size_workaround = !isa(Size, LLVM.ConstantInt) || convert(Int, Size) != 1
end

obj = emit_allocobj!(B, tag, Size, needs_dynamic_size_workaround)
T_size_t = convert(LLVM.LLVMType, Int)
allocSize = if value_type(Size) != T_size_t
trunc!(B, Size, T_size_t)
else
Size
end

obj = emit_allocobj!(B, tag, allocSize, needs_dynamic_size_workaround)

if ZI != C_NULL
unsafe_store!(ZI, zero_allocation(B, TT, LLVMType, obj, AlignedSize, Size, #=ZeroAll=#false))
Expand Down
Loading