Skip to content

Commit 35ca368

Browse files
committed
split into separate test to avoid failure in normal builds
1 parent 4a943f2 commit 35ca368

File tree

2 files changed

+46
-10
lines changed

2 files changed

+46
-10
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
; RUN: opt -passes=debugify --debugify-atoms -S -o - < %s \
2+
; RUN: | FileCheck %s
3+
4+
;; Mirrors llvm/test/DebugInfo/debugify.ll. Split out here because the
5+
;; test is only supported if LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS is enabled
6+
;; (which is a condition for running this test directory). Once the conditional
7+
;; compilation of the feature is removed this can be merged into the original.
8+
9+
; CHECK-LABEL: define void @foo
10+
define void @foo() {
11+
; CHECK: ret void, !dbg ![[RET1:.*]]
12+
ret void
13+
}
14+
15+
; CHECK-LABEL: define i32 @bar
16+
define i32 @bar() {
17+
; CHECK: call void @foo(), !dbg ![[CALL1:.*]]
18+
call void @foo()
19+
20+
; CHECK: add i32 0, 1, !dbg ![[ADD1:.*]]
21+
%sum = add i32 0, 1
22+
23+
; CHECK: ret i32 0, !dbg ![[RET2:.*]]
24+
ret i32 0
25+
}
26+
27+
; CHECK-LABEL: define weak_odr zeroext i1 @baz
28+
define weak_odr zeroext i1 @baz() {
29+
; CHECK-NOT: !dbg
30+
ret i1 false
31+
}
32+
33+
; CHECK-LABEL: define i32 @boom
34+
define i32 @boom() {
35+
; CHECK: [[result:%.*]] = musttail call i32 @bar(), !dbg ![[musttail:.*]]
36+
%retval = musttail call i32 @bar()
37+
; CHECK-NEXT: ret i32 [[result]], !dbg ![[musttailRes:.*]]
38+
ret i32 %retval
39+
}
40+
41+
; CHECK-DAG: ![[RET1]] = !DILocation(line: 1, {{.*}}, atomGroup: 1, atomRank: 1
42+
; CHECK-DAG: ![[CALL1]] = !DILocation(line: 2, {{.*}}, atomGroup: 2, atomRank: 1
43+
; CHECK-DAG: ![[ADD1]] = !DILocation(line: 3, {{.*}}, atomGroup: 3, atomRank: 1
44+
; CHECK-DAG: ![[RET2]] = !DILocation(line: 4, {{.*}}, atomGroup: 4, atomRank: 1
45+
; CHECK-DAG: ![[musttail]] = !DILocation(line: 5, {{.*}}, atomGroup: 5, atomRank: 1
46+
; CHECK-DAG: ![[musttailRes]] = !DILocation(line: 6, {{.*}}, atomGroup: 6, atomRank: 1

llvm/test/DebugInfo/debugify.ll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
; RUN: opt -passes=debugify -S -o - < %s | FileCheck %s
22
; RUN: opt -passes=debugify -S -o - < %s | FileCheck %s
33

4-
; RUN: opt -passes=debugify --debugify-atoms -S -o - < %s \
5-
; RUN: | FileCheck %s -check-prefixes=CHECK-ATOMS
6-
74
; RUN: opt -passes=debugify,debugify -S -o - < %s 2>&1 | \
85
; RUN: FileCheck %s -check-prefix=CHECK-REPEAT
96
; RUN: opt -passes=debugify,debugify -S -o - < %s 2>&1 | \
@@ -104,13 +101,6 @@ define i32 @boom() {
104101
; CHECK-DAG: ![[musttail]] = !DILocation(line: 5, column: 1
105102
; CHECK-DAG: ![[musttailRes]] = !DILocation(line: 6, column: 1
106103

107-
; CHECK-ATOMS-DAG: !DILocation(line: 1{{.*}}, atomGroup: 1, atomRank: 1
108-
; CHECK-ATOMS-DAG: !DILocation(line: 2{{.*}}, atomGroup: 2, atomRank: 1
109-
; CHECK-ATOMS-DAG: !DILocation(line: 3{{.*}}, atomGroup: 3, atomRank: 1
110-
; CHECK-ATOMS-DAG: !DILocation(line: 4{{.*}}, atomGroup: 4, atomRank: 1
111-
; CHECK-ATOMS-DAG: !DILocation(line: 5{{.*}}, atomGroup: 5, atomRank: 1
112-
; CHECK-ATOMS-DAG: !DILocation(line: 6{{.*}}, atomGroup: 6, atomRank: 1
113-
114104
; --- DILocalVariables
115105
; CHECK-DAG: ![[TY32:.*]] = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
116106
; CHECK-DAG: !DILocalVariable(name: "1", scope: {{.*}}, file: {{.*}}, line: 1, type: ![[TY32]])

0 commit comments

Comments
 (0)