summaryrefslogtreecommitdiff
path: root/test/unit.fromasm
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.fromasm')
-rw-r--r--test/unit.fromasm74
1 files changed, 35 insertions, 39 deletions
diff --git a/test/unit.fromasm b/test/unit.fromasm
index cd9874cea..57277cdd3 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -234,20 +234,20 @@
)
(func $smallCompare (; 19 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(if
- (i32.lt_s
- (get_local $0)
- (get_local $1)
- )
- (set_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
- )
- )
- )
- (if
(i32.lt_u
- (get_local $0)
+ (tee_local $0
+ (select
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ (get_local $0)
+ (i32.lt_s
+ (get_local $0)
+ (get_local $1)
+ )
+ )
+ )
(get_local $1)
)
(set_local $0
@@ -427,24 +427,20 @@
(func $zeroInit (; 26 ;) (; has Stack IR ;) (param $0 i32)
(local $1 i32)
(if
- (call $lb
- (i32.const 0)
- )
- (if
- (call $lb
- (i32.const 1)
- )
- (set_local $1
+ (i32.eq
+ (if (result i32)
+ (call $lb
+ (i32.const 0)
+ )
+ (if (result i32)
+ (call $lb
+ (i32.const 1)
+ )
+ (i32.const 3)
+ (get_local $1)
+ )
(i32.const 3)
)
- )
- (set_local $1
- (i32.const 3)
- )
- )
- (if
- (i32.eq
- (get_local $1)
(i32.const 3)
)
(drop
@@ -1000,16 +996,16 @@
)
(if
(i32.eq
- (get_local $0)
- (i32.const 300)
- )
- (set_local $1
- (i32.const 2)
- )
- )
- (if
- (i32.eq
- (get_local $1)
+ (tee_local $1
+ (select
+ (i32.const 2)
+ (get_local $1)
+ (i32.eq
+ (get_local $0)
+ (i32.const 300)
+ )
+ )
+ )
(i32.const 2)
)
(call $relooperJumpThreading_irreducible