• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S -memoryssa %s | FileCheck %s
2; REQUIRES: asserts
3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-unknown-linux-gnu"
5
6; CHECK-LABEL: @func()
7; Function Attrs: noinline
8define dso_local void @func() unnamed_addr #0 align 2 {
9entry:
10  %NoFinalize.addr = alloca i8, align 1
11  call void @blah()
12  call void @blah()
13  call void @blah()
14  call void @blah()
15  call void @blah()
16  call void @blah()
17  %call8 = call zeroext i1 @foo()
18  br i1 %call8, label %if.then9, label %while.cond
19
20if.then9:                                         ; preds = %entry
21  call void @blah()
22  call void @blah()
23  call void @blah()
24  call void @blah()
25  call void @blah()
26  call void @blah()
27  call void @blah()
28  br label %while.cond
29
30while.cond:                                       ; preds = %cleanup, %if.then9, %entry
31  %call34 = call zeroext i1 @foo()
32  call void @blah()
33  br i1 %call34, label %while.body, label %while.end
34
35while.body:                                       ; preds = %while.cond
36  %call35 = call zeroext i1 @foo()
37  br i1 %call35, label %if.end37, label %if.then36
38
39if.then36:                                        ; preds = %while.body
40  store i32 2, i32* undef, align 4
41  br label %cleanup
42
43if.end37:                                         ; preds = %while.body
44  %call38 = call zeroext i1 @foo()
45  br i1 %call38, label %if.end46, label %land.lhs.true
46
47land.lhs.true:                                    ; preds = %if.end37
48  call void @blah()
49  %call41 = call zeroext i1 @foo()
50  br i1 %call41, label %if.then42, label %if.end46
51
52if.then42:                                        ; preds = %land.lhs.true
53  call void @blah()
54  br label %if.end46
55
56if.end46:                                         ; preds = %if.then42, %land.lhs.true, %if.end37
57  call void @blah()
58  call void @blah()
59  call void @blah()
60  call void @blah()
61  br label %cleanup
62
63cleanup:                                          ; preds = %if.end46, %if.then36
64  call void @blah()
65  br label %while.cond
66
67while.end:                                        ; preds = %while.cond
68  call void @blah()
69  call void @blah()
70  call void @blah()
71  call void @blah()
72  call void @blah()
73  call void @blah()
74  call void @blah()
75  call void @blah()
76  call void @blah()
77  call void @blah()
78  call void @blah()
79  call void @blah()
80  call void @blah()
81  call void @blah()
82  call void @blah()
83  %call93 = call zeroext i1 @foo()
84  br i1 %call93, label %if.end120, label %if.then94
85
86if.then94:                                        ; preds = %while.end
87  store i32 0, i32* undef, align 4
88  call void @blah()
89  call void @blah()
90  call void @blah()
91  call void @blah()
92  call void @blah()
93  call void @blah()
94  call void @blah()
95  call void @blah()
96  call void @blah()
97  br label %for.cond
98
99for.cond:                                         ; preds = %for.body, %if.then94
100  br i1 undef, label %for.body, label %if.end120
101
102for.body:                                         ; preds = %for.cond
103  call void @blah()
104  call void @blah()
105  call void @blah()
106  call void @blah()
107  call void @blah()
108  call void @blah()
109  call void @blah()
110  call void @blah()
111  call void @blah()
112  call void @blah()
113  call void @blah()
114  call void @blah()
115  call void @blah()
116  call void @blah()
117  br label %for.cond
118
119if.end120:                                        ; preds = %for.cond, %while.end
120  %val = load i8, i8* %NoFinalize.addr, align 1
121  ret void
122}
123
124; Function Attrs: noinline
125declare hidden void @blah() unnamed_addr #0 align 2
126
127; Function Attrs: noinline
128declare hidden i1 @foo() local_unnamed_addr #0 align 2
129
130attributes #0 = { noinline }
131
132