4068011d65 (master): ZJIT: Fold BoxBool(Test(cond:BoolExact)) to cond

0 views
Skip to first unread message

Max Bernstein

unread,
2:53 AM (21 hours ago) 2:53 AM
to ruby...@g.ruby-lang.org
Max Bernstein 2026-08-27 14:38:33 +0000 (Thu, 27 Aug 2026)

New Revision: 4068011d65

https://github.com/ruby/ruby/commit/4068011d65

Log:
ZJIT: Fold BoxBool(Test(cond:BoolExact)) to cond

This appears when doing e.g. `l & (a == b)` (as in the included new
test) where `TrueClass#&` does `RTEST(RBOOL(rhs))` and then the right
hand side is already known to be returning a `BoolExact` because it's
from `FixnumEq`.

Modified files:
zjit/src/hir.rs
zjit/src/hir/opt_tests.rs
Reply all
Reply to author
Forward
0 new messages