Skip to content

Commit c24cdd7

Browse files
committed
[KeyInstr][Clang] Update tests with ret atoms
1 parent a883738 commit c24cdd7

File tree

13 files changed

+35
-2
lines changed

13 files changed

+35
-2
lines changed

clang/test/DebugInfo/KeyInstructions/agg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ void fun(Struct a) {
2424
// CHECK: %matins = insertelement <25 x float> %3, float 0.000000e+00, i64 0, !dbg [[G4R2:!.*]]
2525
// CHECK: store <25 x float> %matins, ptr @m{{.*}}, !dbg [[G4R1:!.*]]
2626
m[0][0] = 0;
27+
28+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
2729
}
2830

2931
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
@@ -32,3 +34,4 @@ void fun(Struct a) {
3234
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
3335
// CHECK: [[G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2)
3436
// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
37+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/assign-scalar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ void fun() {
5858
// CHECK-NEXT: %inc4 = add i64 %7, 1, !dbg [[G11R2:!.*]]
5959
// CHECK-NEXT: store i64 %inc4, ptr @i{{.*}}, !dbg [[G11R1:!.*]]
6060
g = ++h, ++i;
61+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
6162
}
6263

6364
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
@@ -83,3 +84,4 @@ void fun() {
8384
// CHECK: [[load_i_loc]] = !DILocation(line: [[#]], column: [[#]], scope: ![[#]])
8485
// CHECK: [[G11R2]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 2)
8586
// CHECK: [[G11R1]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 1)
87+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/bitfield.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ void foo(int x, S s) {
1010
// CHECK: %bf.set = or i8 %bf.clear, %bf.value, !dbg [[G1R2:!.*]]
1111
// CHECK: store i8 %bf.set, ptr %s, align 4, !dbg [[G1R1:!.*]]
1212
s.a = x;
13+
14+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
1315
}
1416

1517
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
1618
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
19+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/builtin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ void fun() {
6464
// CHECK-NEXT: %4 = trunc i32 %3 to i8, !dbg [[G15R2:!.*]]
6565
// CHECK-NEXT: call void @llvm.memset{{.*}}, !dbg [[G15R1:!.*]]
6666
__builtin_memset(f4, v, sizeof(float) * 4);
67+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
6768
}
6869

6970
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
@@ -86,3 +87,4 @@ void fun() {
8687
// CHECK: [[G15R3]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 3)
8788
// CHECK: [[G15R2]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 2)
8889
// CHECK: [[G15R1]] = !DILocation({{.*}}, atomGroup: 15, atomRank: 1)
90+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/complex.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ void test() {
7171
// CHECK-C: store float %mul.rl, ptr @f, align 4, !dbg [[G11R1:!.*]]
7272
f *= ci;
7373
#endif
74+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
7475
}
7576

7677
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
@@ -95,3 +96,4 @@ void test() {
9596
// CHECK-C: [[G10R1]] = !DILocation({{.*}}, atomGroup: 10, atomRank: 1)
9697
// CHECK-C: [[G11R2]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 2)
9798
// CHECK-C: [[G11R1]] = !DILocation({{.*}}, atomGroup: 11, atomRank: 1)
99+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/do.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ void a(int A) {
2525
// CHECK: %tobool = icmp ne i32 %dec, 0, !dbg [[G2R1:!.*]]
2626
// CHECK: br i1 %tobool, label %do.body, label %do.end, !dbg [[G3R1:!.*]], !llvm.loop
2727
do { } while (--A);
28+
29+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
2830
}
2931

3032
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
3133
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
3234
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
3335
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)
36+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/if.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ void a(int A) {
3232
if (int B = A; B)
3333
;
3434
#endif
35+
36+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
3537
}
3638

3739
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2)
@@ -44,3 +46,4 @@ void a(int A) {
4446
// CHECK-CXX: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
4547
// CHECK-CXX: [[G5R2]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 2)
4648
// CHECK-CXX: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
49+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/init-agg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ void a() {
3737

3838
// CHECK: store i8 {{.*}}, ptr %uninit{{.*}}, !dbg [[G5R1:!.*]], !annotation
3939
char uninit; // -ftrivial-auto-var-init=pattern
40+
41+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
4042
}
4143

4244
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
@@ -47,3 +49,4 @@ void a() {
4749
// CHECK: [[big_LINE]] = !DILocation(line: 33, scope: ![[#]])
4850
// CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1)
4951
// CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1)
52+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/init-member.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ void fun() {
1717

1818
// CHECK: store i32 1, ptr %x{{.*}}, !dbg [[G1R1:!.*]]
1919
// CHECK: store float 5.000000e+00, ptr %y{{.*}}, !dbg [[G2R1:!.*]]
20+
// CHECK: ret{{.*}}, !dbg [[RET:!.*]]
2021

2122
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
2223
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
24+
// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])

clang/test/DebugInfo/KeyInstructions/init-scalar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ void a() {
1010
// CHECK: %add = add {{.*}}, !dbg [[G2R2:!.*]]
1111
// CHECK: store i32 %add, ptr %B, align 4, !dbg [[G2R1:!.*]]
1212
int B = 2 * A + 1;
13+
// CHECK: ret{{.*}}, !dbg [[G3R1:!.*]]
1314
}
1415

1516
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
1617
// CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
1718
// CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
19+
// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)

0 commit comments

Comments
 (0)