diff --git a/clang/test/KeyInstructions/agg.c b/clang/test/KeyInstructions/agg.c index 6caf84e89537..5772922787fd 100644 --- a/clang/test/KeyInstructions/agg.c +++ b/clang/test/KeyInstructions/agg.c @@ -24,6 +24,8 @@ void fun(Struct a) { // CHECK: %matins = insertelement <25 x float> %3, float 0.000000e+00, i64 0, !dbg [[G4R2:!.*]] // CHECK: store <25 x float> %matins, ptr @m{{.*}}, !dbg [[G4R1:!.*]] m[0][0] = 0; + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) @@ -32,3 +34,4 @@ void fun(Struct a) { // CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) // CHECK: [[G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2) // CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/assign-scalar.c b/clang/test/KeyInstructions/assign-scalar.c index 1f1fe8fda39e..801f3c1391e0 100644 --- a/clang/test/KeyInstructions/assign-scalar.c +++ b/clang/test/KeyInstructions/assign-scalar.c @@ -34,6 +34,8 @@ void fun() { // CHECK: %dec = add i64 %3, -1, !dbg [[G6R2:!.*]] // CHECK: store i64 %dec, ptr @g{{.*}}, !dbg [[G6R1:!.*]] g--; + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) @@ -46,3 +48,4 @@ void fun() { // CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1) // CHECK: [[G6R2]] = !DILocation({{.*}}, atomGroup: 6, atomRank: 2) // CHECK: [[G6R1]] = !DILocation({{.*}}, atomGroup: 6, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/bitfield.cpp b/clang/test/KeyInstructions/bitfield.cpp index 0586050ba839..be470dd7ca02 100644 --- a/clang/test/KeyInstructions/bitfield.cpp +++ b/clang/test/KeyInstructions/bitfield.cpp @@ -7,7 +7,10 @@ void foo(int x, S s) { // CHECK: %bf.set = or i8 %bf.clear, %bf.value, !dbg [[G1R2:!.*]] // CHECK: store i8 %bf.set, ptr %s, align 4, !dbg [[G1R1:!.*]] s.a = x; + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/builtin.c b/clang/test/KeyInstructions/builtin.c index 5129a4ac2c48..dbf4e287d58f 100644 --- a/clang/test/KeyInstructions/builtin.c +++ b/clang/test/KeyInstructions/builtin.c @@ -57,6 +57,8 @@ void fun() { // CHECK: call void @llvm.memset{{.*}}, !dbg [[G14R1:!.*]] __builtin___memset_chk(f4, 0, sizeof(float), -1); + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) @@ -75,3 +77,4 @@ void fun() { // CHECK: [[G12R1]] = !DILocation({{.*}}, atomGroup: 12, atomRank: 1) // CHECK: [[G13R1]] = !DILocation({{.*}}, atomGroup: 13, atomRank: 1) // CHECK: [[G14R1]] = !DILocation({{.*}}, atomGroup: 14, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/complex.c b/clang/test/KeyInstructions/complex.c index b97314e815bd..86dd098ed93f 100644 --- a/clang/test/KeyInstructions/complex.c +++ b/clang/test/KeyInstructions/complex.c @@ -28,6 +28,8 @@ void test() { // CHECK: %add = fadd float %0, %1, !dbg [[G4R2:!.*]] // CHECK: store float %add, ptr getelementptr inbounds nuw ({ float, float }, ptr @ci, i32 0, i32 1){{.*}}, !dbg [[G4R1:!.*]] __imag ci = __imag ci + __imag ci; + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) @@ -38,3 +40,4 @@ void test() { // CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) // CHECK: [[G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2) // CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/do.c b/clang/test/KeyInstructions/do.c index 4b7a38cb3598..9778394c5d00 100644 --- a/clang/test/KeyInstructions/do.c +++ b/clang/test/KeyInstructions/do.c @@ -25,9 +25,12 @@ void a(int A) { // CHECK: %tobool = icmp ne i32 %dec, 0, !dbg [[G2R1:!.*]] // CHECK: br i1 %tobool, label %do.body, label %do.end, !dbg [[G3R1:!.*]], !llvm.loop do { } while (--A); + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) // CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1) // CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/for.c b/clang/test/KeyInstructions/for.c index 3221ece69a71..1336a461eae2 100644 --- a/clang/test/KeyInstructions/for.c +++ b/clang/test/KeyInstructions/for.c @@ -27,6 +27,8 @@ void a(int A) { // CHECK: %inc = add{{.*}}, !dbg [[G4R2:!.*]] // CHECK: store i32 %inc, ptr %i{{.*}}, !dbg [[G4R1:!.*]] for (int i = 0; i < A; ++i) { } + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) @@ -35,3 +37,4 @@ void a(int A) { // CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1) // CHECK: [[G4R2]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 2) // CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/if.c b/clang/test/KeyInstructions/if.c index ccc7eb925319..6fff140db9d0 100644 --- a/clang/test/KeyInstructions/if.c +++ b/clang/test/KeyInstructions/if.c @@ -31,7 +31,9 @@ void a(int A) { // CHECK-CXX: br i1 %tobool4, label %if.then5, label %if.end6{{.*}}, !dbg [[G5R1:!.*]] if (int B = A; B) ; -#endif +#endif + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) @@ -44,3 +46,4 @@ void a(int A) { // CHECK-CXX: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1) // CHECK-CXX: [[G5R2]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 2) // CHECK-CXX: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/init-agg.c b/clang/test/KeyInstructions/init-agg.c index dc3ccaedc57b..1fd0b4909f6a 100644 --- a/clang/test/KeyInstructions/init-agg.c +++ b/clang/test/KeyInstructions/init-agg.c @@ -33,6 +33,8 @@ void a() { // CHECK: store i8 -86, ptr %uninit{{.*}}, !dbg [[G5R1:!.*]], !annotation char uninit; // -ftrivial-auto-var-init=pattern + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) @@ -41,3 +43,4 @@ void a() { // CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) // CHECK: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1) // CHECK: [[G5R1]] = !DILocation({{.*}}, atomGroup: 5, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/init-member.cpp b/clang/test/KeyInstructions/init-member.cpp index 60949bd8a604..a830fd06acb3 100644 --- a/clang/test/KeyInstructions/init-member.cpp +++ b/clang/test/KeyInstructions/init-member.cpp @@ -17,6 +17,8 @@ void fun() { // CHECK: store i32 1, ptr %x{{.*}}, !dbg [[G1R1:!.*]] // CHECK: store float 5.000000e+00, ptr %y{{.*}}, !dbg [[G2R1:!.*]] +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) // CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/init-scalar.c b/clang/test/KeyInstructions/init-scalar.c index c212c2a4fd62..439283b80e3d 100644 --- a/clang/test/KeyInstructions/init-scalar.c +++ b/clang/test/KeyInstructions/init-scalar.c @@ -10,10 +10,10 @@ void a() { // CHECK: %add = add {{.*}}, !dbg [[G2R2:!.*]] // CHECK: store i32 %add, ptr %B, align 4, !dbg [[G2R1:!.*]] int B = 2 * A + 1; -// CHECK-TODO: ret{{.*}}, !dbg [[G3R1:!.*]] +// CHECK: ret{{.*}}, !dbg [[G3R1:!.*]] } // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) // CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2) // CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1) -// CHECK-TODO: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) +// CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) diff --git a/clang/test/KeyInstructions/init-static.cpp b/clang/test/KeyInstructions/init-static.cpp index 82e14b59df5e..5f5ea7566203 100644 --- a/clang/test/KeyInstructions/init-static.cpp +++ b/clang/test/KeyInstructions/init-static.cpp @@ -5,8 +5,9 @@ void g(int *a) { // CHECK: %2 = load ptr, ptr %a.addr{{.*}}, !dbg [[G1R2:!.*]] // CHECK: store ptr %2, ptr @_ZZ1gPiE1b{{.*}}, !dbg [[G1R1:!.*]] static int &b = *a; +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) - +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/switch.c b/clang/test/KeyInstructions/switch.c index cff6b834106e..32485156a8be 100644 --- a/clang/test/KeyInstructions/switch.c +++ b/clang/test/KeyInstructions/switch.c @@ -41,6 +41,8 @@ void a(int A, int B) { } break; default: break; } + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2) @@ -49,3 +51,4 @@ void a(int A, int B) { // CHECK: [[G3R2]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 2) // CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) // CHECK-CXX: [[G4R1]] = !DILocation({{.*}}, atomGroup: 4, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/try-catch.cpp b/clang/test/KeyInstructions/try-catch.cpp index 3d1080aca2f0..6be96d519563 100644 --- a/clang/test/KeyInstructions/try-catch.cpp +++ b/clang/test/KeyInstructions/try-catch.cpp @@ -14,7 +14,10 @@ void attempt() { // CHECK: store i32 %5, ptr %e{{.*}}, !dbg [[G1R1:!.*]] // CHECK: call void @__cxa_end_catch() catch (int e) { } + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]]) diff --git a/clang/test/KeyInstructions/while.c b/clang/test/KeyInstructions/while.c index f1bb91520315..861289e28923 100644 --- a/clang/test/KeyInstructions/while.c +++ b/clang/test/KeyInstructions/while.c @@ -26,9 +26,12 @@ void a(int A) { // CHECK: %tobool = icmp ne i32 %dec, 0, !dbg [[G2R1:!.*]] // CHECK: br i1 %tobool, label %while.body, label %while.end, !dbg [[G3R1:!.*]] while (--A) { }; + +// CHECK: ret{{.*}}, !dbg [[RET:!.*]] } // CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) // CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1) // CHECK: [[G3R1]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1) +// CHECK: [[RET:!.*]] = !DILocation({{.*}}, atomGroup: [[#]], atomRank: [[#]])