diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-11-23 19:12:37 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-11-23 19:12:37 +0000 |
commit | f6857223c9fd534825cd8307b9cb37ada230ec83 (patch) | |
tree | 13a36c07f79e25ff0d38e247abd05afa0e46cce9 /llvm/test/CodeGen/WebAssembly/cfg-stackify.ll | |
parent | 8e8b4fb678016640be0284f6aa73b8806fb76aec (diff) | |
download | bcm5719-llvm-f6857223c9fd534825cd8307b9cb37ada230ec83.tar.gz bcm5719-llvm-f6857223c9fd534825cd8307b9cb37ada230ec83.zip |
[WebAssembly] Always print loop end labels
WebAssembly is currently using labels to end scopes, so for example a
loop scope looks like this:
BB0_0:
loop BB0_1
...
BB0_1:
with BB0_0 being the label of the first block not in the loop. This
requires that the label be printed even when it's only reachable via
fallthrough. To arrange this, insert a no-op LOOP_END instruction in
such cases at the end of the loop.
llvm-svn: 253901
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/cfg-stackify.ll')
-rw-r--r-- | llvm/test/CodeGen/WebAssembly/cfg-stackify.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll b/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll index cac98199215..e62a8c88ef9 100644 --- a/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll +++ b/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll @@ -186,6 +186,7 @@ entry: ; CHECK: BB7_1: ; CHECK: i32.store $0, $pop{{[0-9]+}}{{$}} ; CHECK: br BB7_1{{$}} +; CHECK: BB7_2: define i32 @minimal_loop(i32* %p) { entry: store volatile i32 0, i32* %p @@ -200,6 +201,7 @@ loop: ; CHECK: BB8_1: ; CHECK: loop BB8_2{{$}} ; CHECK: br_if $pop{{[0-9]+}}, BB8_1{{$}} +; CHECK: BB8_2: ; CHECK: return ${{[0-9]+}}{{$}} define i32 @simple_loop(i32* %p, i32 %a) { entry: @@ -285,6 +287,7 @@ exit: ; CHECK: BB11_5: ; CHECK: BB11_6: ; CHECK: br BB11_1{{$}} +; CHECK: BB11_7: define i32 @doublediamond_in_a_loop(i32 %a, i32 %b, i32* %p) { entry: br label %header |