Skip to content

Commit

Permalink
Fix and test LLVM IR for issue JuliaLang#36422 (JuliaLang#36435)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamed2 authored and simeonschaub committed Aug 11, 2020
1 parent d3109b8 commit 1c74c8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ static Value *emit_bits_compare(jl_codectx_t &ctx, jl_cgval_t arg1, jl_cgval_t a
nroots++;
if ((gc_uses[nroots] = get_gc_root_for(arg2)))
nroots++;
OperandBundleDef OpBundle("jl_roots", gc_uses);
OperandBundleDef OpBundle("jl_roots", makeArrayRef(gc_uses, nroots));
Value *answer = ctx.builder.CreateCall(prepare_call(memcmp_func), {
ctx.builder.CreateBitCast(varg1, T_pint8),
ctx.builder.CreateBitCast(varg2, T_pint8),
Expand Down
5 changes: 5 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -451,3 +451,8 @@ end
a = [1]; b = [2]
@test ifelsetuple(5, 3, a, b) == ([1], [1], [1], [2], [2])
end

@testset "#36422" begin
str_36422 = "using InteractiveUtils; code_llvm(Base.ht_keyindex, (Dict{NTuple{65,Int64},Nothing}, NTuple{65,Int64}))"
@test success(`$(Base.julia_cmd()) --startup-file=no -e $str_36422`)
end

0 comments on commit 1c74c8d

Please sign in to comment.