summaryrefslogtreecommitdiff
path: root/test/passes/optimize-instructions.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/optimize-instructions.txt')
-rw-r--r--test/passes/optimize-instructions.txt91
1 files changed, 91 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt
index 0b156f803..5a0a45e3d 100644
--- a/test/passes/optimize-instructions.txt
+++ b/test/passes/optimize-instructions.txt
@@ -11,6 +11,7 @@
(type $9 (func (param i32 i64 f32 f64)))
(type $10 (func (param i32 i64 f32)))
(type $11 (func (param i32 i64 f64 i32)))
+ (type $12 (func (result f64)))
(memory $0 0)
(export "load-off-2" (func $load-off-2))
(func $f (; 0 ;) (type $0) (param $i1 i32) (param $i2 i64)
@@ -2906,6 +2907,96 @@
)
)
)
+ (func $getFallthrough (; 71 ;) (type $1)
+ (local $x0 i32)
+ (local $x1 i32)
+ (local $x2 i32)
+ (local $x3 i32)
+ (local $x4 i32)
+ (local $x5 i32)
+ (local $x6 i32)
+ (local $x7 i32)
+ (set_local $x0
+ (i32.const 1)
+ )
+ (drop
+ (get_local $x0)
+ )
+ (set_local $x1
+ (tee_local $x2
+ (i32.const 1)
+ )
+ )
+ (drop
+ (get_local $x1)
+ )
+ (set_local $x3
+ (loop $loop-in (result i32)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (get_local $x3)
+ )
+ (set_local $x4
+ (if (result i32)
+ (i32.const 1)
+ (i32.const 2)
+ (i32.const 3)
+ )
+ )
+ (drop
+ (i32.and
+ (get_local $x4)
+ (i32.const 7)
+ )
+ )
+ (set_local $x5
+ (if (result i32)
+ (i32.const 1)
+ (unreachable)
+ (i32.const 3)
+ )
+ )
+ (drop
+ (get_local $x5)
+ )
+ (set_local $x6
+ (if (result i32)
+ (i32.const 1)
+ (i32.const 3)
+ (unreachable)
+ )
+ )
+ (drop
+ (get_local $x6)
+ )
+ (drop
+ (block $out (result i32)
+ (set_local $x7
+ (br_if $out
+ (i32.const 1)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (get_local $x7)
+ )
+ (unreachable)
+ )
+ )
+ )
+ (func $tee-with-unreachable-value (; 72 ;) (type $12) (result f64)
+ (local $var$0 i32)
+ (block $label$1 (result f64)
+ (tee_local $var$0
+ (br_if $label$1
+ (f64.const 1)
+ (unreachable)
+ )
+ )
+ )
+ )
)
(module
(type $0 (func))