summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/emcc_hello_world.fromasm1174
-rw-r--r--test/two_sides.fromasm104
2 files changed, 630 insertions, 648 deletions
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index 574eb098a..1ced56e05 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -31729,105 +31729,99 @@
(i32.const 0)
)
)
- (if_else
- (i32.eq
- (get_local $$d_sroa_1_4_extract_trunc)
- (i32.const 0)
- )
- (block
- (if
- (get_local $$4)
- (block
- (i32.store align=4
- (get_local $$rem)
- (i32.rem_u
- (get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$d_sroa_0_0_extract_trunc)
- )
- )
- (i32.store align=4
- (i32.add
+ (br $topmost
+ (if_else
+ (i32.eq
+ (get_local $$d_sroa_1_4_extract_trunc)
+ (i32.const 0)
+ )
+ (block
+ (if
+ (get_local $$4)
+ (block
+ (i32.store align=4
(get_local $$rem)
- (i32.const 4)
+ (i32.rem_u
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$d_sroa_0_0_extract_trunc)
+ )
+ )
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
+ )
+ (i32.const 0)
)
- (i32.const 0)
)
)
- )
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
- (i32.div_u
- (get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$d_sroa_0_0_extract_trunc)
+ (set_local $$_0$1
+ (i32.const 0)
)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ (set_local $$_0$0
+ (i32.div_u
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$d_sroa_0_0_extract_trunc)
)
- (get_local $$_0$0)
)
- )
- )
- (block
- (if
- (i32.eq
- (get_local $$4)
- (i32.const 0)
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
)
- (block
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
+ (get_local $$_0$0)
+ )
+ (block
+ (if
+ (i32.eq
+ (get_local $$4)
(i32.const 0)
)
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ (block
+ (set_local $$_0$1
+ (i32.const 0)
+ )
+ (set_local $$_0$0
+ (i32.const 0)
+ )
+ (br $topmost
+ (block
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
)
- (get_local $$_0$0)
)
)
)
- )
- (i32.store align=4
- (get_local $$rem)
- (i32.and
- (get_local $$a$0)
- (i32.const -1)
- )
- )
- (i32.store align=4
- (i32.add
+ (i32.store align=4
(get_local $$rem)
- (i32.const 4)
+ (i32.and
+ (get_local $$a$0)
+ (i32.const -1)
+ )
)
- (i32.and
- (get_local $$a$1)
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
+ )
+ (i32.and
+ (get_local $$a$1)
+ (i32.const 0)
+ )
+ )
+ (set_local $$_0$1
(i32.const 0)
)
- )
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
- (i32.const 0)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
- )
- (get_local $$_0$0)
+ (set_local $$_0$0
+ (i32.const 0)
)
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
)
)
)
@@ -31840,690 +31834,680 @@
)
)
(block $do-once$0
- (if_else
- (i32.eq
- (get_local $$d_sroa_0_0_extract_trunc)
- (i32.const 0)
- )
- (block
- (if
- (get_local $$17)
- (block
- (if
- (i32.ne
- (get_local $$rem)
- (i32.const 0)
- )
- (block
- (i32.store align=4
+ (br $topmost
+ (if_else
+ (i32.eq
+ (get_local $$d_sroa_0_0_extract_trunc)
+ (i32.const 0)
+ )
+ (block
+ (if
+ (get_local $$17)
+ (block
+ (if
+ (i32.ne
(get_local $$rem)
- (i32.rem_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$d_sroa_0_0_extract_trunc)
- )
+ (i32.const 0)
)
- (i32.store align=4
- (i32.add
+ (block
+ (i32.store align=4
(get_local $$rem)
- (i32.const 4)
+ (i32.rem_u
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$d_sroa_0_0_extract_trunc)
+ )
+ )
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
+ )
+ (i32.const 0)
)
- (i32.const 0)
)
)
- )
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
- (i32.div_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$d_sroa_0_0_extract_trunc)
+ (set_local $$_0$1
+ (i32.const 0)
)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ (set_local $$_0$0
+ (i32.div_u
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$d_sroa_0_0_extract_trunc)
+ )
+ )
+ (br $topmost
+ (block
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
)
- (get_local $$_0$0)
)
)
)
- )
- (if
- (i32.eq
- (get_local $$n_sroa_0_0_extract_trunc)
- (i32.const 0)
- )
- (block
- (if
- (i32.ne
- (get_local $$rem)
- (i32.const 0)
- )
- (block
- (i32.store align=4
+ (if
+ (i32.eq
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (i32.const 0)
+ )
+ (block
+ (if
+ (i32.ne
(get_local $$rem)
(i32.const 0)
)
- (i32.store align=4
- (i32.add
+ (block
+ (i32.store align=4
(get_local $$rem)
- (i32.const 4)
+ (i32.const 0)
)
- (i32.rem_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$d_sroa_1_4_extract_trunc)
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
+ )
+ (i32.rem_u
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$d_sroa_1_4_extract_trunc)
+ )
)
)
)
- )
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
- (i32.div_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$d_sroa_1_4_extract_trunc)
+ (set_local $$_0$1
+ (i32.const 0)
)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ (set_local $$_0$0
+ (i32.div_u
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$d_sroa_1_4_extract_trunc)
+ )
+ )
+ (br $topmost
+ (block
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
)
- (get_local $$_0$0)
)
)
)
- )
- (set_local $$37
- (i32.sub
- (get_local $$d_sroa_1_4_extract_trunc)
- (i32.const 1)
- )
- )
- (if
- (i32.eq
- (i32.and
- (get_local $$37)
+ (set_local $$37
+ (i32.sub
(get_local $$d_sroa_1_4_extract_trunc)
+ (i32.const 1)
)
- (i32.const 0)
)
- (block
- (if
- (i32.ne
- (get_local $$rem)
- (i32.const 0)
+ (if
+ (i32.eq
+ (i32.and
+ (get_local $$37)
+ (get_local $$d_sroa_1_4_extract_trunc)
)
- (block
- (i32.store align=4
+ (i32.const 0)
+ )
+ (block
+ (if
+ (i32.ne
(get_local $$rem)
- (i32.or
- (i32.const 0)
- (i32.and
- (get_local $$a$0)
- (i32.const -1)
- )
- )
+ (i32.const 0)
)
- (i32.store align=4
- (i32.add
+ (block
+ (i32.store align=4
(get_local $$rem)
- (i32.const 4)
+ (i32.or
+ (i32.const 0)
+ (i32.and
+ (get_local $$a$0)
+ (i32.const -1)
+ )
+ )
)
- (i32.or
- (i32.and
- (get_local $$37)
- (get_local $$n_sroa_1_4_extract_trunc)
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
)
- (i32.and
- (get_local $$a$1)
- (i32.const 0)
+ (i32.or
+ (i32.and
+ (get_local $$37)
+ (get_local $$n_sroa_1_4_extract_trunc)
+ )
+ (i32.and
+ (get_local $$a$1)
+ (i32.const 0)
+ )
)
)
)
)
- )
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
- (i32.shr_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (call $_llvm_cttz_i32
- (get_local $$d_sroa_1_4_extract_trunc)
+ (set_local $$_0$1
+ (i32.const 0)
+ )
+ (set_local $$_0$0
+ (i32.shr_u
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (call $_llvm_cttz_i32
+ (get_local $$d_sroa_1_4_extract_trunc)
+ )
)
)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ (br $topmost
+ (block
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
)
- (get_local $$_0$0)
)
)
)
- )
- (set_local $$49
- (i32.clz
- (get_local $$d_sroa_1_4_extract_trunc)
- )
- )
- (set_local $$51
- (i32.sub
- (get_local $$49)
+ (set_local $$49
(i32.clz
- (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$d_sroa_1_4_extract_trunc)
)
)
- )
- (if
- (i32.le_u
- (get_local $$51)
- (i32.const 30)
- )
- (block
- (set_local $$57
- (i32.add
- (get_local $$51)
- (i32.const 1)
- )
- )
- (set_local $$58
- (i32.sub
- (i32.const 31)
- (get_local $$51)
+ (set_local $$51
+ (i32.sub
+ (get_local $$49)
+ (i32.clz
+ (get_local $$n_sroa_1_4_extract_trunc)
)
)
- (set_local $$sr_1_ph
- (get_local $$57)
+ )
+ (if
+ (i32.le_u
+ (get_local $$51)
+ (i32.const 30)
)
- (set_local $$r_sroa_0_1_ph
- (i32.or
- (i32.shl
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$58)
+ (block
+ (set_local $$57
+ (i32.add
+ (get_local $$51)
+ (i32.const 1)
+ )
+ )
+ (set_local $$58
+ (i32.sub
+ (i32.const 31)
+ (get_local $$51)
)
+ )
+ (set_local $$sr_1_ph
+ (get_local $$57)
+ )
+ (set_local $$r_sroa_0_1_ph
+ (i32.or
+ (i32.shl
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$58)
+ )
+ (i32.shr_u
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$57)
+ )
+ )
+ )
+ (set_local $$r_sroa_1_1_ph
(i32.shr_u
- (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$n_sroa_1_4_extract_trunc)
(get_local $$57)
)
)
- )
- (set_local $$r_sroa_1_1_ph
- (i32.shr_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$57)
+ (set_local $$q_sroa_0_1_ph
+ (i32.const 0)
+ )
+ (set_local $$q_sroa_1_1_ph
+ (i32.shl
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$58)
+ )
)
+ (br $do-once$0)
)
- (set_local $$q_sroa_0_1_ph
+ )
+ (if
+ (i32.eq
+ (get_local $$rem)
(i32.const 0)
)
- (set_local $$q_sroa_1_1_ph
- (i32.shl
- (get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$58)
+ (block
+ (set_local $$_0$1
+ (i32.const 0)
+ )
+ (set_local $$_0$0
+ (i32.const 0)
+ )
+ (br $topmost
+ (block
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
+ )
)
)
- (br $do-once$0)
)
- )
- (if
- (i32.eq
+ (i32.store align=4
(get_local $$rem)
- (i32.const 0)
- )
- (block
- (set_local $$_0$1
+ (i32.or
(i32.const 0)
+ (i32.and
+ (get_local $$a$0)
+ (i32.const -1)
+ )
)
- (set_local $$_0$0
- (i32.const 0)
+ )
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
)
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
- )
- (get_local $$_0$0)
+ (i32.or
+ (get_local $$n_sroa_1_4_extract_shift$0)
+ (i32.and
+ (get_local $$a$1)
+ (i32.const 0)
)
)
)
- )
- (i32.store align=4
- (get_local $$rem)
- (i32.or
+ (set_local $$_0$1
(i32.const 0)
- (i32.and
- (get_local $$a$0)
- (i32.const -1)
- )
- )
- )
- (i32.store align=4
- (i32.add
- (get_local $$rem)
- (i32.const 4)
)
- (i32.or
- (get_local $$n_sroa_1_4_extract_shift$0)
- (i32.and
- (get_local $$a$1)
- (i32.const 0)
- )
+ (set_local $$_0$0
+ (i32.const 0)
)
- )
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
- (i32.const 0)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
- )
- (get_local $$_0$0)
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
)
+ (get_local $$_0$0)
)
- )
- (block
- (if
- (i32.eq
- (get_local $$17)
- (i32.const 0)
- )
- (block
- (set_local $$117
- (i32.clz
- (get_local $$d_sroa_1_4_extract_trunc)
- )
+ (block
+ (if
+ (i32.eq
+ (get_local $$17)
+ (i32.const 0)
)
- (set_local $$119
- (i32.sub
- (get_local $$117)
+ (block
+ (set_local $$117
(i32.clz
- (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$d_sroa_1_4_extract_trunc)
)
)
- )
- (if
- (i32.le_u
- (get_local $$119)
- (i32.const 31)
- )
- (block
- (set_local $$125
- (i32.add
- (get_local $$119)
- (i32.const 1)
+ (set_local $$119
+ (i32.sub
+ (get_local $$117)
+ (i32.clz
+ (get_local $$n_sroa_1_4_extract_trunc)
)
)
- (set_local $$126
- (i32.sub
- (i32.const 31)
- (get_local $$119)
- )
+ )
+ (if
+ (i32.le_u
+ (get_local $$119)
+ (i32.const 31)
)
- (set_local $$130
- (i32.shr_s
+ (block
+ (set_local $$125
+ (i32.add
+ (get_local $$119)
+ (i32.const 1)
+ )
+ )
+ (set_local $$126
(i32.sub
+ (i32.const 31)
(get_local $$119)
+ )
+ )
+ (set_local $$130
+ (i32.shr_s
+ (i32.sub
+ (get_local $$119)
+ (i32.const 31)
+ )
(i32.const 31)
)
- (i32.const 31)
)
- )
- (set_local $$sr_1_ph
- (get_local $$125)
- )
- (set_local $$r_sroa_0_1_ph
- (i32.or
+ (set_local $$sr_1_ph
+ (get_local $$125)
+ )
+ (set_local $$r_sroa_0_1_ph
+ (i32.or
+ (i32.and
+ (i32.shr_u
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$125)
+ )
+ (get_local $$130)
+ )
+ (i32.shl
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$126)
+ )
+ )
+ )
+ (set_local $$r_sroa_1_1_ph
(i32.and
(i32.shr_u
- (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$n_sroa_1_4_extract_trunc)
(get_local $$125)
)
(get_local $$130)
)
+ )
+ (set_local $$q_sroa_0_1_ph
+ (i32.const 0)
+ )
+ (set_local $$q_sroa_1_1_ph
(i32.shl
- (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$n_sroa_0_0_extract_trunc)
(get_local $$126)
)
)
+ (br $do-once$0)
)
- (set_local $$r_sroa_1_1_ph
- (i32.and
- (i32.shr_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$125)
- )
- (get_local $$130)
- )
- )
- (set_local $$q_sroa_0_1_ph
+ )
+ (if
+ (i32.eq
+ (get_local $$rem)
(i32.const 0)
)
- (set_local $$q_sroa_1_1_ph
- (i32.shl
- (get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$126)
+ (block
+ (set_local $$_0$1
+ (i32.const 0)
+ )
+ (set_local $$_0$0
+ (i32.const 0)
+ )
+ (br $topmost
+ (block
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
+ )
)
)
- (br $do-once$0)
)
- )
- (if
- (i32.eq
+ (i32.store align=4
(get_local $$rem)
- (i32.const 0)
- )
- (block
- (set_local $$_0$1
+ (i32.or
(i32.const 0)
+ (i32.and
+ (get_local $$a$0)
+ (i32.const -1)
+ )
)
- (set_local $$_0$0
- (i32.const 0)
+ )
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
)
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
- )
- (get_local $$_0$0)
+ (i32.or
+ (get_local $$n_sroa_1_4_extract_shift$0)
+ (i32.and
+ (get_local $$a$1)
+ (i32.const 0)
)
)
)
- )
- (i32.store align=4
- (get_local $$rem)
- (i32.or
+ (set_local $$_0$1
(i32.const 0)
- (i32.and
- (get_local $$a$0)
- (i32.const -1)
- )
)
- )
- (i32.store align=4
- (i32.add
- (get_local $$rem)
- (i32.const 4)
- )
- (i32.or
- (get_local $$n_sroa_1_4_extract_shift$0)
- (i32.and
- (get_local $$a$1)
- (i32.const 0)
- )
+ (set_local $$_0$0
+ (i32.const 0)
)
- )
- (set_local $$_0$1
- (i32.const 0)
- )
- (set_local $$_0$0
- (i32.const 0)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ (br $topmost
+ (block
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
)
- (get_local $$_0$0)
)
)
)
- )
- (set_local $$66
- (i32.sub
- (get_local $$d_sroa_0_0_extract_trunc)
- (i32.const 1)
- )
- )
- (if
- (i32.ne
- (i32.and
- (get_local $$66)
+ (set_local $$66
+ (i32.sub
(get_local $$d_sroa_0_0_extract_trunc)
+ (i32.const 1)
)
- (i32.const 0)
)
- (block
- (set_local $$86
- (i32.add
- (i32.clz
- (get_local $$d_sroa_0_0_extract_trunc)
- )
- (i32.const 33)
+ (if
+ (i32.ne
+ (i32.and
+ (get_local $$66)
+ (get_local $$d_sroa_0_0_extract_trunc)
)
+ (i32.const 0)
)
- (set_local $$88
- (i32.sub
- (get_local $$86)
- (i32.clz
- (get_local $$n_sroa_1_4_extract_trunc)
+ (block
+ (set_local $$86
+ (i32.add
+ (i32.clz
+ (get_local $$d_sroa_0_0_extract_trunc)
+ )
+ (i32.const 33)
)
)
- )
- (set_local $$89
- (i32.sub
- (i32.const 64)
- (get_local $$88)
- )
- )
- (set_local $$91
- (i32.sub
- (i32.const 32)
- (get_local $$88)
- )
- )
- (set_local $$92
- (i32.shr_s
- (get_local $$91)
- (i32.const 31)
- )
- )
- (set_local $$95
- (i32.sub
- (get_local $$88)
- (i32.const 32)
- )
- )
- (set_local $$105
- (i32.shr_s
- (get_local $$95)
- (i32.const 31)
- )
- )
- (set_local $$sr_1_ph
- (get_local $$88)
- )
- (set_local $$r_sroa_0_1_ph
- (i32.or
- (i32.and
- (i32.shr_s
- (i32.sub
- (get_local $$91)
- (i32.const 1)
- )
- (i32.const 31)
- )
- (i32.shr_u
+ (set_local $$88
+ (i32.sub
+ (get_local $$86)
+ (i32.clz
(get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$95)
)
)
- (i32.and
- (i32.or
- (i32.shl
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$91)
- )
- (i32.shr_u
- (get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$88)
- )
- )
- (get_local $$105)
+ )
+ (set_local $$89
+ (i32.sub
+ (i32.const 64)
+ (get_local $$88)
)
)
- )
- (set_local $$r_sroa_1_1_ph
- (i32.and
- (get_local $$105)
- (i32.shr_u
- (get_local $$n_sroa_1_4_extract_trunc)
+ (set_local $$91
+ (i32.sub
+ (i32.const 32)
(get_local $$88)
)
)
- )
- (set_local $$q_sroa_0_1_ph
- (i32.and
- (i32.shl
- (get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$89)
+ (set_local $$92
+ (i32.shr_s
+ (get_local $$91)
+ (i32.const 31)
)
- (get_local $$92)
)
- )
- (set_local $$q_sroa_1_1_ph
- (i32.or
- (i32.and
- (i32.or
- (i32.shl
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$89)
+ (set_local $$95
+ (i32.sub
+ (get_local $$88)
+ (i32.const 32)
+ )
+ )
+ (set_local $$105
+ (i32.shr_s
+ (get_local $$95)
+ (i32.const 31)
+ )
+ )
+ (set_local $$sr_1_ph
+ (get_local $$88)
+ )
+ (set_local $$r_sroa_0_1_ph
+ (i32.or
+ (i32.and
+ (i32.shr_s
+ (i32.sub
+ (get_local $$91)
+ (i32.const 1)
+ )
+ (i32.const 31)
)
(i32.shr_u
- (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$n_sroa_1_4_extract_trunc)
(get_local $$95)
)
)
- (get_local $$92)
+ (i32.and
+ (i32.or
+ (i32.shl
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$91)
+ )
+ (i32.shr_u
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$88)
+ )
+ )
+ (get_local $$105)
+ )
)
+ )
+ (set_local $$r_sroa_1_1_ph
+ (i32.and
+ (get_local $$105)
+ (i32.shr_u
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$88)
+ )
+ )
+ )
+ (set_local $$q_sroa_0_1_ph
(i32.and
(i32.shl
(get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$91)
+ (get_local $$89)
)
- (i32.shr_s
- (i32.sub
- (get_local $$88)
- (i32.const 33)
+ (get_local $$92)
+ )
+ )
+ (set_local $$q_sroa_1_1_ph
+ (i32.or
+ (i32.and
+ (i32.or
+ (i32.shl
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (get_local $$89)
+ )
+ (i32.shr_u
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$95)
+ )
+ )
+ (get_local $$92)
+ )
+ (i32.and
+ (i32.shl
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$91)
+ )
+ (i32.shr_s
+ (i32.sub
+ (get_local $$88)
+ (i32.const 33)
+ )
+ (i32.const 31)
)
- (i32.const 31)
)
)
)
+ (br $do-once$0)
)
- (br $do-once$0)
- )
- )
- (if
- (i32.ne
- (get_local $$rem)
- (i32.const 0)
)
- (block
- (i32.store align=4
+ (if
+ (i32.ne
(get_local $$rem)
- (i32.and
- (get_local $$66)
- (get_local $$n_sroa_0_0_extract_trunc)
- )
- )
- (i32.store align=4
- (i32.add
- (get_local $$rem)
- (i32.const 4)
- )
(i32.const 0)
)
- )
- )
- (if_else
- (i32.eq
- (get_local $$d_sroa_0_0_extract_trunc)
- (i32.const 1)
- )
- (block
- (set_local $$_0$1
- (i32.or
- (get_local $$n_sroa_1_4_extract_shift$0)
+ (block
+ (i32.store align=4
+ (get_local $$rem)
(i32.and
- (get_local $$a$1)
- (i32.const 0)
+ (get_local $$66)
+ (get_local $$n_sroa_0_0_extract_trunc)
)
)
- )
- (set_local $$_0$0
- (i32.or
- (i32.const 0)
- (i32.and
- (get_local $$a$0)
- (i32.const -1)
+ (i32.store align=4
+ (i32.add
+ (get_local $$rem)
+ (i32.const 4)
)
+ (i32.const 0)
)
)
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ )
+ (if_else
+ (i32.eq
+ (get_local $$d_sroa_0_0_extract_trunc)
+ (i32.const 1)
+ )
+ (block
+ (set_local $$_0$1
+ (i32.or
+ (get_local $$n_sroa_1_4_extract_shift$0)
+ (i32.and
+ (get_local $$a$1)
+ (i32.const 0)
+ )
)
- (get_local $$_0$0)
)
- )
- )
- (block
- (set_local $$78
- (call $_llvm_cttz_i32
- (get_local $$d_sroa_0_0_extract_trunc)
+ (set_local $$_0$0
+ (i32.or
+ (i32.const 0)
+ (i32.and
+ (get_local $$a$0)
+ (i32.const -1)
+ )
+ )
+ )
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
)
+ (get_local $$_0$0)
)
- (set_local $$_0$1
- (i32.or
- (i32.const 0)
- (i32.shr_u
- (get_local $$n_sroa_1_4_extract_trunc)
- (get_local $$78)
+ (block
+ (set_local $$78
+ (call $_llvm_cttz_i32
+ (get_local $$d_sroa_0_0_extract_trunc)
)
)
- )
- (set_local $$_0$0
- (i32.or
- (i32.shl
- (get_local $$n_sroa_1_4_extract_trunc)
- (i32.sub
- (i32.const 32)
+ (set_local $$_0$1
+ (i32.or
+ (i32.const 0)
+ (i32.shr_u
+ (get_local $$n_sroa_1_4_extract_trunc)
(get_local $$78)
)
)
- (i32.shr_u
- (get_local $$n_sroa_0_0_extract_trunc)
- (get_local $$78)
- )
)
- )
- (br $topmost
- (block
- (i32.store align=4
- (i32.const 168)
- (get_local $$_0$1)
+ (set_local $$_0$0
+ (i32.or
+ (i32.shl
+ (get_local $$n_sroa_1_4_extract_trunc)
+ (i32.sub
+ (i32.const 32)
+ (get_local $$78)
+ )
+ )
+ (i32.shr_u
+ (get_local $$n_sroa_0_0_extract_trunc)
+ (get_local $$78)
+ )
)
- (get_local $$_0$0)
)
+ (i32.store align=4
+ (i32.const 168)
+ (get_local $$_0$1)
+ )
+ (get_local $$_0$0)
)
)
)
diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm
index 49cd25218..9bf643e2a 100644
--- a/test/two_sides.fromasm
+++ b/test/two_sides.fromasm
@@ -5,76 +5,74 @@
(func $_test (param $i1 i32) (param $i2 i32) (param $i3 i32) (param $i4 i32) (param $i5 i32) (result i32)
(local $d6 f64)
(block $topmost
- (if_else
- (i32.eq
- (get_local $i5)
- (i32.const 0)
- )
- (block
- (set_local $d6
- (f64.convert_s/i32
- (i32.mul
- (get_local $i4)
- (get_local $i3)
- )
- )
+ (br $topmost
+ (if_else
+ (i32.eq
+ (get_local $i5)
+ (i32.const 0)
)
- (set_local $d6
- (f64.mul
- (f64.add
- (f64.convert_s/i32
+ (block
+ (set_local $d6
+ (f64.convert_s/i32
+ (i32.mul
+ (get_local $i4)
(get_local $i3)
)
- (get_local $d6)
)
- (f64.add
- (f64.convert_s/i32
- (get_local $i4)
+ )
+ (set_local $d6
+ (f64.mul
+ (f64.add
+ (f64.convert_s/i32
+ (get_local $i3)
+ )
+ (get_local $d6)
+ )
+ (f64.add
+ (f64.convert_s/i32
+ (get_local $i4)
+ )
+ (get_local $d6)
)
- (get_local $d6)
)
)
- )
- (set_local $i5
- (call_import $f64-to-int
- (get_local $d6)
+ (set_local $i5
+ (call_import $f64-to-int
+ (get_local $d6)
+ )
)
- )
- (br $topmost
(get_local $i5)
)
- )
- (block
- (set_local $d6
- (f64.convert_s/i32
- (i32.mul
- (get_local $i2)
- (get_local $i1)
+ (block
+ (set_local $d6
+ (f64.convert_s/i32
+ (i32.mul
+ (get_local $i2)
+ (get_local $i1)
+ )
)
)
- )
- (set_local $d6
- (f64.mul
- (f64.add
- (f64.convert_s/i32
- (get_local $i3)
+ (set_local $d6
+ (f64.mul
+ (f64.add
+ (f64.convert_s/i32
+ (get_local $i3)
+ )
+ (get_local $d6)
)
- (get_local $d6)
- )
- (f64.add
- (get_local $d6)
- (f64.convert_s/i32
- (get_local $i4)
+ (f64.add
+ (get_local $d6)
+ (f64.convert_s/i32
+ (get_local $i4)
+ )
)
)
)
- )
- (set_local $i5
- (call_import $f64-to-int
- (get_local $d6)
+ (set_local $i5
+ (call_import $f64-to-int
+ (get_local $d6)
+ )
)
- )
- (br $topmost
(get_local $i5)
)
)