diff options
Diffstat (limited to 'test/passes/O3_inline-functions-with-loops_flexible-inline-max-function-size=30.txt')
-rw-r--r-- | test/passes/O3_inline-functions-with-loops_flexible-inline-max-function-size=30.txt | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/test/passes/O3_inline-functions-with-loops_flexible-inline-max-function-size=30.txt b/test/passes/O3_inline-functions-with-loops_flexible-inline-max-function-size=30.txt new file mode 100644 index 000000000..023709819 --- /dev/null +++ b/test/passes/O3_inline-functions-with-loops_flexible-inline-max-function-size=30.txt @@ -0,0 +1,95 @@ +(module + (type $i32_=>_i32 (func (param i32) (result i32))) + (memory $memory 0) + (export "fib" (func $fib)) + (export "looped" (func $looped)) + (export "t0" (func $looped)) + (export "t1" (func $t1)) + (export "t2" (func $t2)) + (export "t3" (func $t3)) + (export "memory" (memory $memory)) + (func $fib (; has Stack IR ;) (param $0 i32) (result i32) + (if + (i32.le_s + (local.get $0) + (i32.const 2) + ) + (return + (local.get $0) + ) + ) + (i32.add + (call $fib + (i32.sub + (local.get $0) + (i32.const 1) + ) + ) + (call $fib + (i32.sub + (local.get $0) + (i32.const 2) + ) + ) + ) + ) + (func $looped (; 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) + ) + (func $t2 (; has Stack IR ;) (param $0 i32) (result i32) + (call $fib + (local.get $0) + ) + ) + (func $t3 (; has Stack IR ;) (param $0 i32) (result i32) + (call $fib + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) +) |