diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-06 16:14:13 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 18:42:14 -0700 |
commit | c2072c3f7c96eed6abbc7901c181bec92e3b9ced (patch) | |
tree | 4e76eeb402646a57c2c4fd60776f8d23f1ec53fe /test/unit.fromasm.no-opts | |
parent | 779c2a20af50c351fb725b785a0ed6932143280d (diff) | |
download | binaryen-c2072c3f7c96eed6abbc7901c181bec92e3b9ced.tar.gz binaryen-c2072c3f7c96eed6abbc7901c181bec92e3b9ced.tar.bz2 binaryen-c2072c3f7c96eed6abbc7901c181bec92e3b9ced.zip |
optimize loads+shifts into signed loads
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r-- | test/unit.fromasm.no-opts | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 2162d9ed7..1c0e87f6a 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -1007,6 +1007,96 @@ ) ) ) + (func $loadSigned (param $x i32) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $x) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load8_u + (get_local $x) + ) + (i32.const 24) + ) + (i32.const 24) + ) + ) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load16_s + (get_local $x) + ) + (i32.const 16) + ) + (i32.const 16) + ) + ) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load16_u + (get_local $x) + ) + (i32.const 16) + ) + (i32.const 16) + ) + ) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load8_s + (get_local $x) + ) + (i32.const 24) + ) + (i32.const 16) + ) + ) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load8_u + (get_local $x) + ) + (i32.const 16) + ) + (i32.const 24) + ) + ) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load16_s + (get_local $x) + ) + (i32.const 16) + ) + (i32.const 24) + ) + ) + (call $loadSigned + (i32.shr_s + (i32.shl + (i32.load16_u + (get_local $x) + ) + (i32.const 24) + ) + (i32.const 16) + ) + ) + ) (func $z (nop) ) |