Skip to content

Commit 22c4315

Browse files
committed
fix missing optimization and gc root condition test for emit_f_is (fixes dates test)
1 parent 78ef6d5 commit 22c4315

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codegen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ static Value *emit_f_is(const jl_cgval_t &arg1, const jl_cgval_t &arg2, jl_codec
20462046
if (!sub1 && !sub2) // types are disjoint (exhaustive test)
20472047
return ConstantInt::get(T_int1, 0);
20482048

2049-
bool isbits = isleaf && isteq && jl_is_bitstype(rt1);
2049+
bool isbits = isleaf && isteq && jl_isbits(rt1);
20502050
if (isbits) { // whether this type is unique'd by value
20512051
return emit_bits_compare(arg1, arg2, ctx);
20522052
}
@@ -2069,7 +2069,7 @@ static Value *emit_f_is(const jl_cgval_t &arg1, const jl_cgval_t &arg2, jl_codec
20692069
if (arg2.isboxed && arg2.needsgcroot)
20702070
make_gcroot(arg2.V, ctx);
20712071
Value *varg1 = boxed(arg1, ctx);
2072-
if (!arg1.isboxed && arg1.needsgcroot)
2072+
if (!arg1.isboxed)
20732073
make_gcroot(varg1, ctx);
20742074
Value *varg2 = boxed(arg2, ctx); // unrooted!
20752075
#ifdef LLVM37

0 commit comments

Comments
 (0)