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

correct codegen bugs introduced by allocation-hoisting-PR #45476

Merged
merged 17 commits into from
Jul 21, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add explicit check instead of assertion
  • Loading branch information
gbaraldi committed Jun 22, 2022
commit 4cac1d0f1a228da452de781bc06e6236924c4c23
3 changes: 1 addition & 2 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3732,8 +3732,7 @@ static jl_cgval_t emit_new_struct(jl_codectx_t &ctx, jl_value_t *ty, size_t narg
ctx.builder.CreateAlignedStore(fval, dest, Align(jl_field_align(sty, i)))))
->setOrdering(AtomicOrdering::Unordered);
}
else if (jl_is_uniontype(jtype)) {
assert(!field_promotable);
else if (jl_is_uniontype(jtype) && !field_promotable) {
// compute tindex from rhs
jl_cgval_t rhs_union = convert_julia_type(ctx, fval_info, jtype);
if (rhs_union.typ == jl_bottom_type)
Expand Down