diff options
author | Alan Wu <[email protected]> | 2025-06-06 22:00:32 +0900 |
---|---|---|
committer | Alan Wu <[email protected]> | 2025-06-09 22:36:53 +0900 |
commit | 038087adf7243366cabb6db32c9034de032397f7 (patch) | |
tree | b3ac262f6a0e3f585944839410e2b69d905de69a /test/ruby | |
parent | 1c43f7e9668b841f8976b32c60c3ce6b2aeffc23 (diff) |
ZJIT: Parse opt_or into HIR
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13549
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_zjit.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index 905ee2f125..9ee1cde35d 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -226,6 +226,13 @@ class TestZJIT < Test::Unit::TestCase RUBY end + def test_opt_or + assert_compiles('[11, [3, 2, 1]]', <<~RUBY, insns: [:opt_or]) + def test(x, y) = x | y + return test(0b1000, 3), test([3, 2, 1], [1, 2, 3]) + RUBY + end + def test_opt_ge assert_compiles '[false, true, true]', %q{ def test(a, b) = a >= b |