• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %s -debugify -jump-threading -S | FileCheck %s
2; Tests Bug 37966
3
4define void @test0(i32 %i) {
5; CHECK-LABEL: @test0(
6; CHECK: left:
7; CHECK: br label %left, !dbg ![[DBG0:[0-9]+]]
8 entry:
9  %c0 = icmp ult i32 %i, 5
10  br i1 %c0, label %left, label %right
11
12 left:
13  br i1 %c0, label %left, label %right ; "line 3" to -debugify
14
15 right:
16  ret void
17}
18
19define void @test1(i32 %i, i32 %len) {
20; CHECK-LABEL: @test1(
21; CHECK: left:
22; CHECK: br label %right, !dbg ![[DBG1:[0-9]+]]
23 entry:
24  %i.inc = add nuw i32 %i, 1
25  %c0 = icmp ult i32 %i.inc, %len
26  br i1 %c0, label %left, label %right
27
28 left:
29  %c1 = icmp ult i32 %i, %len
30  br i1 %c1, label %right, label %left0 ; "line 9" to -debugify
31
32 left0:
33  ret void
34
35 right:
36  ret void
37}
38
39; CHECK-DAG: ![[DBG0]] = !DILocation(line: 3,
40; CHECK-DAG: ![[DBG1]] = !DILocation(line: 9,
41
42