Skip to content

Commit 1c74c8d

Browse files
iamed2simeonschaub
authored andcommitted
Fix and test LLVM IR for issue JuliaLang#36422 (JuliaLang#36435)
1 parent d3109b8 commit 1c74c8d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/codegen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2352,7 +2352,7 @@ static Value *emit_bits_compare(jl_codectx_t &ctx, jl_cgval_t arg1, jl_cgval_t a
23522352
nroots++;
23532353
if ((gc_uses[nroots] = get_gc_root_for(arg2)))
23542354
nroots++;
2355-
OperandBundleDef OpBundle("jl_roots", gc_uses);
2355+
OperandBundleDef OpBundle("jl_roots", makeArrayRef(gc_uses, nroots));
23562356
Value *answer = ctx.builder.CreateCall(prepare_call(memcmp_func), {
23572357
ctx.builder.CreateBitCast(varg1, T_pint8),
23582358
ctx.builder.CreateBitCast(varg2, T_pint8),

test/compiler/codegen.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,3 +451,8 @@ end
451451
a = [1]; b = [2]
452452
@test ifelsetuple(5, 3, a, b) == ([1], [1], [1], [2], [2])
453453
end
454+
455+
@testset "#36422" begin
456+
str_36422 = "using InteractiveUtils; code_llvm(Base.ht_keyindex, (Dict{NTuple{65,Int64},Nothing}, NTuple{65,Int64}))"
457+
@test success(`$(Base.julia_cmd()) --startup-file=no -e $str_36422`)
458+
end

0 commit comments

Comments
 (0)