diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/linker/archive/bar.s | 5 | ||||
-rw-r--r-- | test/linker/archive/foobar.a | 24 | ||||
-rw-r--r-- | test/linker/bar.c | 4 | ||||
-rw-r--r-- | test/linker/quux.c | 1 | ||||
-rw-r--r-- | test/passes/simplify-locals.txt | 19 | ||||
-rw-r--r-- | test/passes/simplify-locals.wast | 19 |
6 files changed, 65 insertions, 7 deletions
diff --git a/test/linker/archive/bar.s b/test/linker/archive/bar.s index 7c39347e0..5012d4f14 100644 --- a/test/linker/archive/bar.s +++ b/test/linker/archive/bar.s @@ -1,15 +1,16 @@ .text - .file "src/work/binaryen/test/linker/archive/bar.c" + .file "test/linker/bar.c" .section .text.bar,"ax",@progbits .hidden bar .globl bar .type bar,@function bar: # @bar # BB#0: # %entry + call quux@FUNCTION return .endfunc .Lfunc_end0: .size bar, .Lfunc_end0-bar - .ident "clang version 3.9.0 (trunk 267883) (llvm/trunk 267901)" + .ident "clang version 3.9.0 (trunk 268553) (llvm/trunk 268561)" diff --git a/test/linker/archive/foobar.a b/test/linker/archive/foobar.a index 6028e8ce5..0da380708 100644 --- a/test/linker/archive/foobar.a +++ b/test/linker/archive/foobar.a @@ -1,4 +1,21 @@ !<arch> +quux.s/ 0 0 0 644 345 ` + .text + .file "test/linker/quux.c" + .section .text.quux,"ax",@progbits + .hidden quux + .globl quux + .type quux,@function +quux: # @quux +# BB#0: # %entry + return + .endfunc +.Lfunc_end0: + .size quux, .Lfunc_end0-quux + + + .ident "clang version 3.9.0 (trunk 268553) (llvm/trunk 268561)" + foo.s/ 0 0 0 644 407 ` .text .file "src/work/binaryen/test/linker/foo.c" @@ -19,22 +36,23 @@ foo: # @foo .ident "clang version 3.9.0 (trunk 267883) (llvm/trunk 267901)" -bar.s/ 0 0 0 644 363 ` +bar.s/ 0 0 0 644 361 ` .text - .file "src/work/binaryen/test/linker/archive/bar.c" + .file "test/linker/bar.c" .section .text.bar,"ax",@progbits .hidden bar .globl bar .type bar,@function bar: # @bar # BB#0: # %entry + call quux@FUNCTION return .endfunc .Lfunc_end0: .size bar, .Lfunc_end0-bar - .ident "clang version 3.9.0 (trunk 267883) (llvm/trunk 267901)" + .ident "clang version 3.9.0 (trunk 268553) (llvm/trunk 268561)" baz.s/ 0 0 0 644 355 ` .text diff --git a/test/linker/bar.c b/test/linker/bar.c index 0476ca2b0..8f32349da 100644 --- a/test/linker/bar.c +++ b/test/linker/bar.c @@ -1,2 +1,2 @@ -void bar() { -} +void quux(); +void bar() { quux(); } diff --git a/test/linker/quux.c b/test/linker/quux.c new file mode 100644 index 000000000..d9baa902a --- /dev/null +++ b/test/linker/quux.c @@ -0,0 +1 @@ +void quux() {} diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index cc84c35d5..d97e8fc33 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -517,4 +517,23 @@ (get_local $m) (get_local $t) ) + (func $switch-def (param $i3 i32) (result i32) + (local $i1 i32) + (set_local $i1 + (i32.const 10) + ) + (block $switch$def + (block $switch-case$1 + (br_table $switch-case$1 $switch$def + (get_local $i3) + ) + ) + (set_local $i1 + (i32.const 1) + ) + ) + (return + (get_local $i1) + ) + ) ) diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast index 5f1db4bdb..521e8bac4 100644 --- a/test/passes/simplify-locals.wast +++ b/test/passes/simplify-locals.wast @@ -451,5 +451,24 @@ (get_local $s) (get_local $t) ) + (func $switch-def (param $i3 i32) (result i32) + (local $i1 i32) + (set_local $i1 + (i32.const 10) + ) + (block $switch$def + (block $switch-case$1 + (br_table $switch-case$1 $switch$def + (get_local $i3) + ) + ) + (set_local $i1 + (i32.const 1) + ) + ) + (return + (get_local $i1) + ) + ) ) |