Eric Christopher | cee313d | 2019-04-17 04:52:47 +0000 | [diff] [blame] | 1 | ; RUN: opt %s -debugify -simplifycfg -S | FileCheck %s |
| 2 | ; Tests Bug 37966 |
| 3 | |
| 4 | define 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]+]] |
| 8 | entry: |
| 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 | |
| 16 | if.then: ; preds = %entry |
| 17 | call void @foo() |
| 18 | br label %if.end |
| 19 | |
| 20 | if.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 | |
| 24 | if.then.1: ; preds = %if.end |
| 25 | call void @foo() |
| 26 | br label %if.end.1 |
| 27 | |
| 28 | if.end.1: ; preds = %if.then.1, %if.end |
| 29 | store i32 2, i32* %bb, align 4 |
| 30 | br label %for.end |
| 31 | |
| 32 | for.end: ; preds = %if.end.1 |
| 33 | ret void |
| 34 | } |
| 35 | |
| 36 | declare void @foo() |
| 37 | |
| 38 | ; CHECK: ![[DBG]] = !DILocation(line: 10, |