diff options
| author | Dan Gohman <dan433584@gmail.com> | 2015-10-02 21:11:36 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2015-10-02 21:11:36 +0000 |
| commit | e3e4a5ff52c6da274aeb06b1a990ee0d729dd2d1 (patch) | |
| tree | 1d2fe04d49004f20d12042a542c8afcfafbf3108 /llvm/test/CodeGen | |
| parent | 75c2feb75337f63d428f33fa52e74c8cdc40a104 (diff) | |
| download | bcm5719-llvm-e3e4a5ff52c6da274aeb06b1a990ee0d729dd2d1.tar.gz bcm5719-llvm-e3e4a5ff52c6da274aeb06b1a990ee0d729dd2d1.zip | |
[WebAssembly] Fix CFG stackification of nested loops.
llvm-svn: 249187
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/WebAssembly/cfg-stackify.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll b/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll index 205384e6102..8ba6bcf61b2 100644 --- a/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll +++ b/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll @@ -272,3 +272,33 @@ exit: store volatile i32 4, i32* %p ret i32 0 } + +; Test that nested loops are handled. + +declare void @bar() + +define void @test3(i32 %w) { +entry: + br i1 undef, label %outer.ph, label %exit + +outer.ph: + br label %outer + +outer: + %tobool = icmp eq i32 undef, 0 + br i1 %tobool, label %inner, label %unreachable + +unreachable: + unreachable + +inner: + %c = icmp eq i32 undef, %w + br i1 %c, label %if.end, label %inner + +exit: + ret void + +if.end: + call void @bar() + br label %outer +} |

