summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.txt54
-rw-r--r--test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.wast39
2 files changed, 93 insertions, 0 deletions
diff --git a/test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.txt b/test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.txt
new file mode 100644
index 000000000..685ba4513
--- /dev/null
+++ b/test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.txt
@@ -0,0 +1,54 @@
+(module
+ (type $i32_=>_i32 (func (param i32) (result i32)))
+ (memory $memory 0)
+ (export "test" (func $test))
+ (export "t0" (func $test))
+ (export "t1" (func $t1))
+ (export "memory" (memory $memory))
+ (func $test (; has Stack IR ;) (param $0 i32) (result i32)
+ (loop $L0
+ (if
+ (i32.ge_s
+ (local.get $0)
+ (i32.const 0)
+ )
+ (block
+ (local.set $0
+ (i32.sub
+ (local.get $0)
+ (i32.const 1)
+ )
+ )
+ (br $L0)
+ )
+ )
+ )
+ (local.get $0)
+ )
+ (func $t1 (; has Stack IR ;) (param $0 i32) (result i32)
+ (local.set $0
+ (i32.add
+ (local.get $0)
+ (i32.const 1)
+ )
+ )
+ (loop $L0
+ (if
+ (i32.ge_s
+ (local.get $0)
+ (i32.const 0)
+ )
+ (block
+ (local.set $0
+ (i32.sub
+ (local.get $0)
+ (i32.const 1)
+ )
+ )
+ (br $L0)
+ )
+ )
+ )
+ (local.get $0)
+ )
+)
diff --git a/test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.wast b/test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.wast
new file mode 100644
index 000000000..ec8e5bfe5
--- /dev/null
+++ b/test/passes/O3_inline-heavyweight-functions_flexible-inline-max-function-size=30.wast
@@ -0,0 +1,39 @@
+(module
+ (type $t0 (func (param i32) (result i32)))
+ (func $test (export "test") (type $t0) (param $p0 i32) (result i32)
+ (loop $L0
+ (if $I1
+ (i32.ge_s
+ (local.get $p0)
+ (i32.const 0)
+ )
+ (then
+ (local.set $p0
+ (i32.sub
+ (local.get $p0)
+ (i32.const 1)
+ )
+ )
+ (br $L0)
+ )
+ )
+ )
+ (local.get $p0)
+ )
+
+ (func $t0 (export "t0") (type $t0) (param $p0 i32) (result i32)
+ (call $test
+ (local.get $p0)
+ )
+ )
+
+ (func $t1 (export "t1") (type $t0) (param $p0 i32) (result i32)
+ (call $test
+ (i32.add
+ (local.get $p0)
+ (i32.const 1)
+ )
+ )
+ )
+ (memory $memory (export "memory") 0)
+)