summaryrefslogtreecommitdiff
path: root/src/wasm-debug.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-09-13 11:33:00 -0700
committerGitHub <noreply@github.com>2021-09-13 11:33:00 -0700
commitec2c5df877c479855bd13d280b98220e50bb99f9 (patch)
tree27ea5e95fa15846cb7773552a78b95c3f476cf04 /src/wasm-debug.h
parent5b90e0332253ee879d16fbc29d391ad75734ecf5 (diff)
downloadbinaryen-ec2c5df877c479855bd13d280b98220e50bb99f9.tar.gz
binaryen-ec2c5df877c479855bd13d280b98220e50bb99f9.tar.bz2
binaryen-ec2c5df877c479855bd13d280b98220e50bb99f9.zip
OptimizeInstructions: Optimize boolean selects (#4147)
If all a select's inputs are boolean, we can sometimes turn the select into an AND or an OR operation, x ? y : 0 => x & y x ? 1 : y => x | y I believe LLVM aggressively canonicalizes to this form. It makes sense to do here too as it is smaller (save the constant 0 or 1). It also allows further optimizations (which is why LLVM does it) but I don't think we have those yet.
Diffstat (limited to 'src/wasm-debug.h')
0 files changed, 0 insertions, 0 deletions