diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-10-02 11:12:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-02 11:12:50 -0700 |
commit | 45d88e3ef5f895b2fde77e3588f84d66e67bdd88 (patch) | |
tree | bd0a3f43cf79c8d70a03ecf558de756b3019221d /test/passes/optimize-instructions.wast | |
parent | 2ec15bea0c5b7d4112e06fadcc3a531f303d4a4c (diff) | |
download | binaryen-45d88e3ef5f895b2fde77e3588f84d66e67bdd88.tar.gz binaryen-45d88e3ef5f895b2fde77e3588f84d66e67bdd88.tar.bz2 binaryen-45d88e3ef5f895b2fde77e3588f84d66e67bdd88.zip |
fix optimize-instructions handling of shifts by a zero or of a zero when combining added constants (#1206)
Diffstat (limited to 'test/passes/optimize-instructions.wast')
-rw-r--r-- | test/passes/optimize-instructions.wast | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions.wast b/test/passes/optimize-instructions.wast index f84be8330..a4478b755 100644 --- a/test/passes/optimize-instructions.wast +++ b/test/passes/optimize-instructions.wast @@ -2587,4 +2587,32 @@ (i64.const 255) ) ) + (func $optimizeAddedConstants-filters-through-nonzero (result i32) + (i32.sub + (i32.add + (i32.shl + (i32.const -536870912) + (i32.wrap/i64 + (i64.const 0) + ) + ) + (i32.const -32768) + ) + (i32.const -1024) + ) + ) + (func $optimizeAddedConstants-filters-through-nonzero-b (result i32) + (i32.sub + (i32.add + (i32.shl + (i32.const -536870912) + (i32.wrap/i64 + (i64.const -1) + ) + ) + (i32.const -32768) + ) + (i32.const -1024) + ) + ) ) |