blob: 3dc0cd16e8842927020e72f7d60c45c21d26dcb7 [file] [log] [blame]
Heejin Ahn777d01c2019-01-03 23:10:11 +00001; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-block-placement -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
2
3target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
4target triple = "wasm32-unknown-unknown"
5
6; Test an interesting pattern of nested irreducibility.
7; Just check we resolve all the irreducibility here (if not we'd crash).
8
9; CHECK-LABEL: func_2:
10
11; Function Attrs: noinline nounwind optnone
12define void @func_2() {
13entry:
14 br i1 undef, label %lbl_937, label %if.else787
15
16lbl_937: ; preds = %for.body978, %entry
17 br label %if.end965
18
19if.else787: ; preds = %entry
20 br label %if.end965
21
22if.end965: ; preds = %if.else787, %lbl_937
23 br label %for.cond967
24
25for.cond967: ; preds = %for.end1035, %if.end965
26 br label %for.cond975
27
28for.cond975: ; preds = %if.end984, %for.cond967
29 br i1 undef, label %for.body978, label %for.end1035
30
31for.body978: ; preds = %for.cond975
32 br i1 undef, label %lbl_937, label %if.end984
33
34if.end984: ; preds = %for.body978
35 br label %for.cond975
36
37for.end1035: ; preds = %for.cond975
38 br label %for.cond967
39}