summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_zjit.rb10
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