summaryrefslogtreecommitdiff
path: root/test/emcc_hello_world.fromasm.imprecise
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-11-30 15:02:01 -0800
committerGitHub <noreply@github.com>2016-11-30 15:02:01 -0800
commit36be3e0151dd7357e47b2d8f432bdd706a30466c (patch)
tree99a40bc874dbe786ae14eaec0e78bdcfc0ea0c86 /test/emcc_hello_world.fromasm.imprecise
parent7d2d9ec9f2f936d0a53b7dc60089456a0654d29c (diff)
downloadbinaryen-36be3e0151dd7357e47b2d8f432bdd706a30466c.tar.gz
binaryen-36be3e0151dd7357e47b2d8f432bdd706a30466c.tar.bz2
binaryen-36be3e0151dd7357e47b2d8f432bdd706a30466c.zip
Fix regression from #850 (#851)
* fix regression from #850 - it is not always safe to fold added offsets into load/store offsets, as the add wraps but offset does not * small refactoring to simplify asm2wasm pass invocation
Diffstat (limited to 'test/emcc_hello_world.fromasm.imprecise')
-rw-r--r--test/emcc_hello_world.fromasm.imprecise22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise
index adadfe086..4363dc349 100644
--- a/test/emcc_hello_world.fromasm.imprecise
+++ b/test/emcc_hello_world.fromasm.imprecise
@@ -4349,11 +4349,14 @@
(i32.store8
(get_local $5)
(i32.or
- (i32.load8_u offset=4075
- (tee_local $7
- (i32.trunc_s/f64
- (get_local $15)
+ (i32.load8_u
+ (i32.add
+ (tee_local $7
+ (i32.trunc_s/f64
+ (get_local $15)
+ )
)
+ (i32.const 4075)
)
)
(get_local $13)
@@ -6582,10 +6585,13 @@
)
)
(i32.or
- (i32.load8_u offset=4075
- (i32.and
- (get_local $5)
- (i32.const 15)
+ (i32.load8_u
+ (i32.add
+ (i32.and
+ (get_local $5)
+ (i32.const 15)
+ )
+ (i32.const 4075)
)
)
(get_local $9)