mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-09 05:10:53 +01:00
This change folds: a * 1 => a a / 1 => a a * -1 => -a a / -1 => -a a * 2 => a + a a / 2^k => a * 2^-k Note that the following folds are all invalid: a + 0 => a (breaks for negative zero) a - (-0) => a (breaks for negative zero) a - a => 0 (breaks for NaN) a - 0 could be folded into a but that doesn't happen in benchmarks. Various cases of UNM_NUM could be optimized (eg (-a) * (-b) = a * b), but that doesn't happen in benchmarks either. |
||
---|---|---|
.. | ||
include | ||
src |