From a04c960a358811b598434c62528d2cac8a2a1cb7 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 6 Apr 2020 19:04:43 +0100 Subject: [PATCH] * src/comp.c (emit_FIXNUMP): Don't emit a shift when unnecessary. --- src/comp.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/comp.c b/src/comp.c index 0a803545e59..32fc7f23c4e 100644 --- a/src/comp.c +++ b/src/comp.c @@ -936,13 +936,14 @@ emit_FIXNUMP (gcc_jit_rvalue *obj) emit_comment ("FIXNUMP"); gcc_jit_rvalue *sh_res = - emit_binary_op ( - GCC_JIT_BINARY_OP_RSHIFT, - comp.emacs_int_type, - emit_XLI (obj), - gcc_jit_context_new_rvalue_from_int (comp.ctxt, - comp.emacs_int_type, - (USE_LSB_TAG ? 0 : FIXNUM_BITS))); + USE_LSB_TAG ? obj + : emit_binary_op (GCC_JIT_BINARY_OP_RSHIFT, + comp.emacs_int_type, + emit_XLI (obj), + gcc_jit_context_new_rvalue_from_int ( + comp.ctxt, + comp.emacs_int_type, + FIXNUM_BITS)); gcc_jit_rvalue *minus_res = emit_binary_op ( -- 2.39.5