Skip to content

Commit

Permalink
fix missing optimization and gc root condition test for emit_f_is (fi…
Browse files Browse the repository at this point in the history
…xes dates test)
  • Loading branch information
vtjnash committed Aug 20, 2015
1 parent a0a69fb commit 2ee54f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,7 @@ static Value *emit_f_is(const jl_cgval_t &arg1, const jl_cgval_t &arg2, jl_codec
if (!sub1 && !sub2) // types are disjoint (exhaustive test)
return ConstantInt::get(T_int1, 0);

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

0 comments on commit 2ee54f7

Please sign in to comment.