summaryrefslogtreecommitdiff
path: root/test/binaryen.js/functions.js
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2020-09-18 02:39:39 +0300
committerGitHub <noreply@github.com>2020-09-17 16:39:39 -0700
commit2548f04c198594a21e4144261e8cfea5de56308a (patch)
treecd3172a039e10917d34adf456093869aebddff01 /test/binaryen.js/functions.js
parent2d47c0b8ae7b72e710b982abce83429c50c6de30 (diff)
downloadbinaryen-2548f04c198594a21e4144261e8cfea5de56308a.tar.gz
binaryen-2548f04c198594a21e4144261e8cfea5de56308a.tar.bz2
binaryen-2548f04c198594a21e4144261e8cfea5de56308a.zip
Optimize binary operations with 1-bit on lhs and 1 const on rhs (#2948)
`expr | 1` --> `1` `expr & 1` --> `expr` `expr == 1` --> `expr` `expr != 1` --> `!expr` where `maxBits(expr) == 1` i.e `expr` is boolean
Diffstat (limited to 'test/binaryen.js/functions.js')
0 files changed, 0 insertions, 0 deletions