mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Fix "immediate value too large" on cmp for x86_64 (#14125)
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
This commit is contained in:
parent
bcd21053f7
commit
ebb775be8d
2 changed files with 31 additions and 4 deletions
|
@ -283,6 +283,14 @@ class TestZJIT < Test::Unit::TestCase
|
|||
}, insns: [:opt_eq], call_threshold: 2
|
||||
end
|
||||
|
||||
def test_opt_eq_with_minus_one
|
||||
assert_compiles '[false, true]', %q{
|
||||
def test(a) = a == -1
|
||||
test(1) # profile opt_eq
|
||||
[test(0), test(-1)]
|
||||
}, insns: [:opt_eq], call_threshold: 2
|
||||
end
|
||||
|
||||
def test_opt_neq_dynamic
|
||||
# TODO(max): Don't split this test; instead, run all tests with and without
|
||||
# profiling.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue