YJIT: fix small bug causing jit_rb_int_rshift to side-exit (#9684)
YJIT: fix bug causing jit_rb_int_rshift to side-exit The nqueens benchmark was showing zero performance improvement because we immediately side-exited as soon as the shift amount changed. If the amount changes, we want to fall back to the C function call, not side-exit.
This commit is contained in:
parent
578ff32611
commit
23d4682926
@ -4712,6 +4712,8 @@ fn jit_rb_int_lshift(
|
||||
}
|
||||
|
||||
// Fallback to a C call if the shift amount varies
|
||||
// This check is needed because the chain guard will side-exit
|
||||
// if its max depth is reached
|
||||
if asm.ctx.get_chain_depth() > 0 {
|
||||
return false;
|
||||
}
|
||||
@ -4771,7 +4773,9 @@ fn jit_rb_int_rshift(
|
||||
}
|
||||
|
||||
// Fallback to a C call if the shift amount varies
|
||||
if asm.ctx.get_chain_depth() > 1 {
|
||||
// This check is needed because the chain guard will side-exit
|
||||
// if its max depth is reached
|
||||
if asm.ctx.get_chain_depth() > 0 {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user