diff options
| author | Max Bernstein <max@bernsteinbear.com> | 2025-07-16 15:50:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-16 19:50:33 +0000 |
| commit | 900eb04853be06c3293bd77c699edfd4f9273d69 (patch) | |
| tree | 50d4f2d0859f7f31c7513c6ace78c3c4198dd360 /test/ruby | |
| parent | 343619c93ca4d590189ca154e66a67776601aa26 (diff) | |
ZJIT: Split shift with immediate operand (#13914)
Fix https://github.com/Shopify/ruby/issues/627
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_zjit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index 299600eef9..0f83a75db7 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -382,6 +382,16 @@ class TestZJIT < Test::Unit::TestCase }, call_threshold: 2, insns: [:opt_or] end + def test_fixnum_mul + assert_compiles '12', %q{ + C = 3 + def test(n) = C * n + test(4) + test(4) + test(4) + }, call_threshold: 2, insns: [:opt_mult] + end + def test_opt_not assert_compiles('[true, true, false]', <<~RUBY, insns: [:opt_not]) def test(obj) = !obj |
