diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-02-16 22:42:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-16 22:42:31 -0800 |
commit | c6ea79d1532face076c2dfeb8eadb58319e4e5fd (patch) | |
tree | 12a840d94dda462827a8874371bb9858948ea42b /test/unit.fromasm | |
parent | 0728a53fb6bf0540b9789c7bcd26e195800c5ecc (diff) | |
download | binaryen-c6ea79d1532face076c2dfeb8eadb58319e4e5fd.tar.gz binaryen-c6ea79d1532face076c2dfeb8eadb58319e4e5fd.tar.bz2 binaryen-c6ea79d1532face076c2dfeb8eadb58319e4e5fd.zip |
Optimize "squared" operations (#905)
* optimize 'almost' sign extends: when we can remove one entirely, then extra shifts can be left behind. with that in place, we can then optimize 'squared' operations like shl on shl, as doing so does not break our sign extend opts
Diffstat (limited to 'test/unit.fromasm')
-rw-r--r-- | test/unit.fromasm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/unit.fromasm b/test/unit.fromasm index 2a6c60735..585240a95 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -696,14 +696,11 @@ ) ) (call $loadSigned - (i32.shr_s - (i32.shl - (i32.load16_u - (get_local $0) - ) - (i32.const 24) + (i32.shl + (i32.load16_s + (get_local $0) ) - (i32.const 16) + (i32.const 8) ) ) ) |