From 22c4315d8e276ffbbf61fa67eec6e1fa8518c77f Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 19 Aug 2015 15:12:05 -0400 Subject: [PATCH] fix missing optimization and gc root condition test for emit_f_is (fixes dates test) --- src/codegen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 67e7f4a79638aa..980e7a0269ac4c 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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); } @@ -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