summaryrefslogtreecommitdiff
path: root/test/emcc_hello_world.fromasm
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-11-30 11:12:17 -0800
committerGitHub <noreply@github.com>2017-11-30 11:12:17 -0800
commitbcc6205e83ec98f9b3d5704b79255a853a4ee8bd (patch)
treefdedb36cbc9df17a636abffd082a54f7be6c3092 /test/emcc_hello_world.fromasm
parent290b875970c535f910bbcd5755090f1723447573 (diff)
downloadbinaryen-bcc6205e83ec98f9b3d5704b79255a853a4ee8bd.tar.gz
binaryen-bcc6205e83ec98f9b3d5704b79255a853a4ee8bd.tar.bz2
binaryen-bcc6205e83ec98f9b3d5704b79255a853a4ee8bd.zip
De-morgan's "and" law (#1297)
(eqz X) and (eqz Y) === eqz (X or Y) Normally de-morgan's laws apply only to boolean vars, but for the and (but not or or xor) version, it works in all cases (both sides are true iff X and Y have all zero bits).
Diffstat (limited to 'test/emcc_hello_world.fromasm')
-rw-r--r--test/emcc_hello_world.fromasm130
1 files changed, 53 insertions, 77 deletions
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index 2b03ce2a0..3246cd8d1 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -3659,27 +3659,20 @@
(br $__rjti$3)
)
(if
- (i32.and
- (i32.eqz
- (tee_local $7
- (i32.load
- (tee_local $5
- (get_local $19)
- )
+ (i32.or
+ (tee_local $7
+ (i32.load
+ (tee_local $5
+ (get_local $19)
)
)
)
- (i32.eqz
- (tee_local $8
- (i32.load offset=4
- (get_local $5)
- )
+ (tee_local $8
+ (i32.load offset=4
+ (get_local $5)
)
)
)
- (set_local $8
- (get_local $26)
- )
(block
(set_local $5
(get_local $7)
@@ -3707,27 +3700,24 @@
)
)
(br_if $while-in32
- (i32.eqz
- (i32.and
- (i32.eqz
- (tee_local $5
- (call $_bitshift64Lshr
- (get_local $5)
- (get_local $7)
- (i32.const 3)
- )
- )
- )
- (i32.eqz
- (tee_local $7
- (get_global $tempRet0)
- )
+ (i32.or
+ (tee_local $5
+ (call $_bitshift64Lshr
+ (get_local $5)
+ (get_local $7)
+ (i32.const 3)
)
)
+ (tee_local $7
+ (get_global $tempRet0)
+ )
)
)
)
)
+ (set_local $8
+ (get_local $26)
+ )
)
(set_local $5
(if (result i32)
@@ -6478,38 +6468,22 @@
)
)
(if
- (i32.and
- (i32.eqz
- (tee_local $8
- (i32.load
- (tee_local $5
- (get_local $19)
- )
+ (i32.or
+ (tee_local $8
+ (i32.load
+ (tee_local $5
+ (get_local $19)
)
)
)
- (i32.eqz
- (tee_local $11
- (i32.load offset=4
- (get_local $5)
- )
+ (tee_local $11
+ (i32.load offset=4
+ (get_local $5)
)
)
)
(block
(set_local $5
- (get_local $26)
- )
- (set_local $8
- (i32.const 0)
- )
- (set_local $9
- (i32.const 4091)
- )
- (br $__rjti$8)
- )
- (block
- (set_local $5
(get_local $8)
)
(set_local $8
@@ -6537,23 +6511,17 @@
)
)
(br_if $while-in123
- (i32.eqz
- (i32.and
- (i32.eqz
- (tee_local $5
- (call $_bitshift64Lshr
- (get_local $5)
- (get_local $11)
- (i32.const 4)
- )
- )
- )
- (i32.eqz
- (tee_local $11
- (get_global $tempRet0)
- )
+ (i32.or
+ (tee_local $5
+ (call $_bitshift64Lshr
+ (get_local $5)
+ (get_local $11)
+ (i32.const 4)
)
)
+ (tee_local $11
+ (get_global $tempRet0)
+ )
)
)
(set_local $5
@@ -6569,15 +6537,13 @@
(i32.const 8)
)
)
- (i32.and
- (i32.eqz
+ (i32.eqz
+ (i32.or
(i32.load
(tee_local $11
(get_local $19)
)
)
- )
- (i32.eqz
(i32.load offset=4
(get_local $11)
)
@@ -6606,6 +6572,18 @@
)
(br $__rjti$8)
)
+ (block
+ (set_local $5
+ (get_local $26)
+ )
+ (set_local $8
+ (i32.const 0)
+ )
+ (set_local $9
+ (i32.const 4091)
+ )
+ (br $__rjti$8)
+ )
)
)
(set_local $5
@@ -9378,11 +9356,9 @@
)
)
(if
- (i32.and
- (i32.eqz
+ (i32.eqz
+ (i32.or
(get_local $4)
- )
- (i32.eqz
(get_local $0)
)
)