blob: c5eb43642bf8a69c5676d0e621676ed94fe2f7e7 [file] [log] [blame]
Eric Christophercee313d2019-04-17 04:52:47 +00001; RUN: opt %s -debugify -simplifycfg -S | FileCheck %s
2; Tests Bug 37966
3
4define void @bar(i32 %aa) {
5; CHECK-LABEL: @bar(
6; CHECK: if.end.1.critedge:
7; CHECK: br label %if.end.1, !dbg ![[DBG:[0-9]+]]
8entry:
9 %aa.addr = alloca i32, align 4
10 %bb = alloca i32, align 4
11 store i32 %aa, i32* %aa.addr, align 4
12 store i32 0, i32* %bb, align 4
13 %tobool = icmp ne i32 %aa, 0
14 br i1 %tobool, label %if.then, label %if.end
15
16if.then: ; preds = %entry
17 call void @foo()
18 br label %if.end
19
20if.end: ; preds = %if.then, %entry
21 store i32 1, i32* %bb, align 4
22 br i1 %tobool, label %if.then.1, label %if.end.1 ; "line 10" to -debugify
23
24if.then.1: ; preds = %if.end
25 call void @foo()
26 br label %if.end.1
27
28if.end.1: ; preds = %if.then.1, %if.end
29 store i32 2, i32* %bb, align 4
30 br label %for.end
31
32for.end: ; preds = %if.end.1
33 ret void
34}
35
36declare void @foo()
37
38; CHECK: ![[DBG]] = !DILocation(line: 10,