Skip to content

Commit c984987

Browse files
committed
ZJIT: Parse opt_or into HIR
1 parent 5ab019b commit c984987

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/ruby/test_zjit.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ def test(x, y) = x & y
226226
RUBY
227227
end
228228

229+
def test_opt_or
230+
assert_compiles('[11, [3, 2, 1]]', <<~RUBY, insns: [:opt_or])
231+
def test(x, y) = x | y
232+
return test(0b1000, 3), test([3, 2, 1], [1, 2, 3])
233+
RUBY
234+
end
235+
229236
def test_opt_ge
230237
assert_compiles '[false, true, true]', %q{
231238
def test(a, b) = a >= b

0 commit comments

Comments
 (0)