llvm.org GIT mirror llvm / a172b8d
[llvm-opt-report] Print line numbers starting from 1 Line numbers should start from 1, not 2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283440 91177308-0d34-0410-b5e6-96231b3b80d8 Hal Finkel 2 years ago
5 changed file(s) with 186 addition(s) and 186 deletion(s). Raw diff Collapse all Expand all
11 RUN: llvm-opt-report -s -r %p %p/Inputs/or.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
22
33 ; CHECK: < {{.*[/\]}}or.c
4 ; CHECK-NEXT: 2 | void bar();
5 ; CHECK-NEXT: 3 | void foo() { bar(); }
6 ; CHECK-NEXT: 4 |
7 ; CHECK-NEXT: 5 | #include "or.h"
8 ; CHECK-NEXT: 6 |
9 ; CHECK-NEXT: 7 | void Test(int *res, int *c, int *d, int *p, int n) {
10 ; CHECK-NEXT: 8 | int i;
11 ; CHECK-NEXT: 9 |
12 ; CHECK-NEXT: 10 | #pragma clang loop vectorize(assume_safety)
13 ; CHECK-NEXT: 11 V4,2 | for (i = 0; i < 1600; i++) {
14 ; CHECK-NEXT: 12 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
15 ; CHECK-NEXT: 13 | }
16 ; CHECK-NEXT: 14 |
17 ; CHECK-NEXT: 15 U16 | for (i = 0; i < 16; i++) {
18 ; CHECK-NEXT: 16 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
19 ; CHECK-NEXT: 17 | }
20 ; CHECK-NEXT: 18 |
21 ; CHECK-NEXT: 19 I | foo();
22 ; CHECK-NEXT: 20 |
23 ; CHECK-NEXT: 21 | foo(); bar(); foo();
24 ; CHECK-NEXT: I | ^
25 ; CHECK-NEXT: I | ^
26 ; CHECK-NEXT: 22 | }
27 ; CHECK-NEXT: 23 |
28
29 ; CHECK: < {{.*[/\]}}or.h
30 ; CHECK-NEXT: 2 | void TestH(int *res, int *c, int *d, int *p, int n) {
31 ; CHECK-NEXT: 3 | int i;
32 ; CHECK-NEXT: 4 |
33 ; CHECK-NEXT: 5 | #pragma clang loop vectorize(assume_safety)
34 ; CHECK-NEXT: 6 V4,2 | for (i = 0; i < 1600; i++) {
35 ; CHECK-NEXT: 7 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
36 ; CHECK-NEXT: 8 | }
37 ; CHECK-NEXT: 9 |
38 ; CHECK-NEXT: 10 U16 | for (i = 0; i < 16; i++) {
4 ; CHECK-NEXT: 1 | void bar();
5 ; CHECK-NEXT: 2 | void foo() { bar(); }
6 ; CHECK-NEXT: 3 |
7 ; CHECK-NEXT: 4 | #include "or.h"
8 ; CHECK-NEXT: 5 |
9 ; CHECK-NEXT: 6 | void Test(int *res, int *c, int *d, int *p, int n) {
10 ; CHECK-NEXT: 7 | int i;
11 ; CHECK-NEXT: 8 |
12 ; CHECK-NEXT: 9 | #pragma clang loop vectorize(assume_safety)
13 ; CHECK-NEXT: 10 V4,2 | for (i = 0; i < 1600; i++) {
3914 ; CHECK-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
4015 ; CHECK-NEXT: 12 | }
4116 ; CHECK-NEXT: 13 |
42 ; CHECK-NEXT: 14 I | foo();
43 ; CHECK-NEXT: 15 |
44 ; CHECK-NEXT: 16 | foo(); bar(); foo();
17 ; CHECK-NEXT: 14 U16 | for (i = 0; i < 16; i++) {
18 ; CHECK-NEXT: 15 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
19 ; CHECK-NEXT: 16 | }
20 ; CHECK-NEXT: 17 |
21 ; CHECK-NEXT: 18 I | foo();
22 ; CHECK-NEXT: 19 |
23 ; CHECK-NEXT: 20 | foo(); bar(); foo();
4524 ; CHECK-NEXT: I | ^
4625 ; CHECK-NEXT: I | ^
47 ; CHECK-NEXT: 17 | }
48 ; CHECK-NEXT: 18 |
26 ; CHECK-NEXT: 21 | }
27 ; CHECK-NEXT: 22 |
28
29 ; CHECK: < {{.*[/\]}}or.h
30 ; CHECK-NEXT: 1 | void TestH(int *res, int *c, int *d, int *p, int n) {
31 ; CHECK-NEXT: 2 | int i;
32 ; CHECK-NEXT: 3 |
33 ; CHECK-NEXT: 4 | #pragma clang loop vectorize(assume_safety)
34 ; CHECK-NEXT: 5 V4,2 | for (i = 0; i < 1600; i++) {
35 ; CHECK-NEXT: 6 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
36 ; CHECK-NEXT: 7 | }
37 ; CHECK-NEXT: 8 |
38 ; CHECK-NEXT: 9 U16 | for (i = 0; i < 16; i++) {
39 ; CHECK-NEXT: 10 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
40 ; CHECK-NEXT: 11 | }
41 ; CHECK-NEXT: 12 |
42 ; CHECK-NEXT: 13 I | foo();
43 ; CHECK-NEXT: 14 |
44 ; CHECK-NEXT: 15 | foo(); bar(); foo();
45 ; CHECK-NEXT: I | ^
46 ; CHECK-NEXT: I | ^
47 ; CHECK-NEXT: 16 | }
48 ; CHECK-NEXT: 17 |
4949
5050 ; CHECK-SUCCINCT: < {{.*[/\]}}or.c
51 CHECK-SUCCINCT-NEXT: 2 | void bar();
52 CHECK-SUCCINCT-NEXT: 3 | void foo() { bar(); }
53 CHECK-SUCCINCT-NEXT: 4 |
54 CHECK-SUCCINCT-NEXT: 5 | #include "or.h"
55 CHECK-SUCCINCT-NEXT: 6 |
56 CHECK-SUCCINCT-NEXT: 7 | void Test(int *res, int *c, int *d, int *p, int n) {
57 CHECK-SUCCINCT-NEXT: 8 | int i;
58 CHECK-SUCCINCT-NEXT: 9 |
59 CHECK-SUCCINCT-NEXT: 10 | #pragma clang loop vectorize(assume_safety)
60 CHECK-SUCCINCT-NEXT: 11 V | for (i = 0; i < 1600; i++) {
61 CHECK-SUCCINCT-NEXT: 12 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
62 CHECK-SUCCINCT-NEXT: 13 | }
63 CHECK-SUCCINCT-NEXT: 14 |
64 CHECK-SUCCINCT-NEXT: 15 U | for (i = 0; i < 16; i++) {
65 CHECK-SUCCINCT-NEXT: 16 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
66 CHECK-SUCCINCT-NEXT: 17 | }
67 CHECK-SUCCINCT-NEXT: 18 |
68 CHECK-SUCCINCT-NEXT: 19 I | foo();
69 CHECK-SUCCINCT-NEXT: 20 |
70 CHECK-SUCCINCT-NEXT: 21 | foo(); bar(); foo();
71 CHECK-SUCCINCT-NEXT: I | ^
72 CHECK-SUCCINCT-NEXT: I | ^
73 CHECK-SUCCINCT-NEXT: 22 | }
74 CHECK-SUCCINCT-NEXT: 23 |
51 ; CHECK-SUCCINCT-NEXT: 1 | void bar();
52 ; CHECK-SUCCINCT-NEXT: 2 | void foo() { bar(); }
53 ; CHECK-SUCCINCT-NEXT: 3 |
54 ; CHECK-SUCCINCT-NEXT: 4 | #include "or.h"
55 ; CHECK-SUCCINCT-NEXT: 5 |
56 ; CHECK-SUCCINCT-NEXT: 6 | void Test(int *res, int *c, int *d, int *p, int n) {
57 ; CHECK-SUCCINCT-NEXT: 7 | int i;
58 ; CHECK-SUCCINCT-NEXT: 8 |
59 ; CHECK-SUCCINCT-NEXT: 9 | #pragma clang loop vectorize(assume_safety)
60 ; CHECK-SUCCINCT-NEXT: 10 V | for (i = 0; i < 1600; i++) {
61 ; CHECK-SUCCINCT-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
62 ; CHECK-SUCCINCT-NEXT: 12 | }
63 ; CHECK-SUCCINCT-NEXT: 13 |
64 ; CHECK-SUCCINCT-NEXT: 14 U | for (i = 0; i < 16; i++) {
65 ; CHECK-SUCCINCT-NEXT: 15 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
66 ; CHECK-SUCCINCT-NEXT: 16 | }
67 ; CHECK-SUCCINCT-NEXT: 17 |
68 ; CHECK-SUCCINCT-NEXT: 18 I | foo();
69 ; CHECK-SUCCINCT-NEXT: 19 |
70 ; CHECK-SUCCINCT-NEXT: 20 | foo(); bar(); foo();
71 ; CHECK-SUCCINCT-NEXT: I | ^
72 ; CHECK-SUCCINCT-NEXT: I | ^
73 ; CHECK-SUCCINCT-NEXT: 21 | }
74 ; CHECK-SUCCINCT-NEXT: 22 |
7575
7676 CHECK-SUCCINCT: < {{.*[/\]}}or.h
77 CHECK-SUCCINCT-NEXT: 2 | void TestH(int *res, int *c, int *d, int *p, int n) {
78 CHECK-SUCCINCT-NEXT: 3 | int i;
79 CHECK-SUCCINCT-NEXT: 4 |
80 CHECK-SUCCINCT-NEXT: 5 | #pragma clang loop vectorize(assume_safety)
81 CHECK-SUCCINCT-NEXT: 6 V | for (i = 0; i < 1600; i++) {
82 CHECK-SUCCINCT-NEXT: 7 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
83 CHECK-SUCCINCT-NEXT: 8 | }
84 CHECK-SUCCINCT-NEXT: 9 |
85 CHECK-SUCCINCT-NEXT: 10 U | for (i = 0; i < 16; i++) {
86 CHECK-SUCCINCT-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
87 CHECK-SUCCINCT-NEXT: 12 | }
88 CHECK-SUCCINCT-NEXT: 13 |
89 CHECK-SUCCINCT-NEXT: 14 I | foo();
90 CHECK-SUCCINCT-NEXT: 15 |
91 CHECK-SUCCINCT-NEXT: 16 | foo(); bar(); foo();
92 CHECK-SUCCINCT-NEXT: I | ^
93 CHECK-SUCCINCT-NEXT: I | ^
94 CHECK-SUCCINCT-NEXT: 17 | }
95 CHECK-SUCCINCT-NEXT: 18 |
77 ; CHECK-SUCCINCT-NEXT: 1 | void TestH(int *res, int *c, int *d, int *p, int n) {
78 ; CHECK-SUCCINCT-NEXT: 2 | int i;
79 ; CHECK-SUCCINCT-NEXT: 3 |
80 ; CHECK-SUCCINCT-NEXT: 4 | #pragma clang loop vectorize(assume_safety)
81 ; CHECK-SUCCINCT-NEXT: 5 V | for (i = 0; i < 1600; i++) {
82 ; CHECK-SUCCINCT-NEXT: 6 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
83 ; CHECK-SUCCINCT-NEXT: 7 | }
84 ; CHECK-SUCCINCT-NEXT: 8 |
85 ; CHECK-SUCCINCT-NEXT: 9 U | for (i = 0; i < 16; i++) {
86 ; CHECK-SUCCINCT-NEXT: 10 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
87 ; CHECK-SUCCINCT-NEXT: 11 | }
88 ; CHECK-SUCCINCT-NEXT: 12 |
89 ; CHECK-SUCCINCT-NEXT: 13 I | foo();
90 ; CHECK-SUCCINCT-NEXT: 14 |
91 ; CHECK-SUCCINCT-NEXT: 15 | foo(); bar(); foo();
92 ; CHECK-SUCCINCT-NEXT: I | ^
93 ; CHECK-SUCCINCT-NEXT: I | ^
94 ; CHECK-SUCCINCT-NEXT: 16 | }
95 ; CHECK-SUCCINCT-NEXT: 17 |
9696
11 RUN: llvm-opt-report -s -r %p %p/Inputs/q2.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
22
33 ; CHECK: < {{.*[/\]}}q2.c
4 ; CHECK-NEXT: 2 | void bar();
5 ; CHECK-NEXT: 3 | void foo(int n) {
6 ; CHECK-NEXT: {{\[\[}}
4 ; CHECK-NEXT: 1 | void bar();
5 ; CHECK-NEXT: 2 | void foo(int n) {
6 ; CHECK-NEXT: {{\[\[}}
77 ; CHECK-NEXT: > quack, quack2:
8 ; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
8 ; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
99 ; CHECK-NEXT: U4 | ^
1010 ; CHECK-NEXT: U4 | ^
1111 ; CHECK-NEXT: > foo:
12 ; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
13 ; CHECK-NEXT: {{\]\]}}
14 ; CHECK-NEXT: 5 | bar();
15 ; CHECK-NEXT: 6 | }
16 ; CHECK-NEXT: 7 |
17 ; CHECK-NEXT: 8 | void quack() {
18 ; CHECK-NEXT: 9 I | foo(4);
19 ; CHECK-NEXT: 10 | }
20 ; CHECK-NEXT: 11 |
21 ; CHECK-NEXT: 12 | void quack2() {
22 ; CHECK-NEXT: 13 I | foo(4);
23 ; CHECK-NEXT: 14 | }
24 ; CHECK-NEXT: 15 |
12 ; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
13 ; CHECK-NEXT: {{\]\]}}
14 ; CHECK-NEXT: 4 | bar();
15 ; CHECK-NEXT: 5 | }
16 ; CHECK-NEXT: 6 |
17 ; CHECK-NEXT: 7 | void quack() {
18 ; CHECK-NEXT: 8 I | foo(4);
19 ; CHECK-NEXT: 9 | }
20 ; CHECK-NEXT: 10 |
21 ; CHECK-NEXT: 11 | void quack2() {
22 ; CHECK-NEXT: 12 I | foo(4);
23 ; CHECK-NEXT: 13 | }
24 ; CHECK-NEXT: 14 |
2525
2626 ; CHECK-SUCCINCT: < {{.*[/\]}}q2.c
27 ; CHECK-SUCCINCT-NEXT: 2 | void bar();
28 ; CHECK-SUCCINCT-NEXT: 3 | void foo(int n) {
29 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
27 ; CHECK-SUCCINCT-NEXT: 1 | void bar();
28 ; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
29 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
3030 ; CHECK-SUCCINCT-NEXT: > quack, quack2:
31 ; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
31 ; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
3232 ; CHECK-SUCCINCT-NEXT: U | ^
3333 ; CHECK-SUCCINCT-NEXT: U | ^
3434 ; CHECK-SUCCINCT-NEXT: > foo:
35 ; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
36 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
37 ; CHECK-SUCCINCT-NEXT: 5 | bar();
38 ; CHECK-SUCCINCT-NEXT: 6 | }
39 ; CHECK-SUCCINCT-NEXT: 7 |
40 ; CHECK-SUCCINCT-NEXT: 8 | void quack() {
41 ; CHECK-SUCCINCT-NEXT: 9 I | foo(4);
42 ; CHECK-SUCCINCT-NEXT: 10 | }
43 ; CHECK-SUCCINCT-NEXT: 11 |
44 ; CHECK-SUCCINCT-NEXT: 12 | void quack2() {
45 ; CHECK-SUCCINCT-NEXT: 13 I | foo(4);
46 ; CHECK-SUCCINCT-NEXT: 14 | }
47 ; CHECK-SUCCINCT-NEXT: 15 |
35 ; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
36 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
37 ; CHECK-SUCCINCT-NEXT: 4 | bar();
38 ; CHECK-SUCCINCT-NEXT: 5 | }
39 ; CHECK-SUCCINCT-NEXT: 6 |
40 ; CHECK-SUCCINCT-NEXT: 7 | void quack() {
41 ; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
42 ; CHECK-SUCCINCT-NEXT: 9 | }
43 ; CHECK-SUCCINCT-NEXT: 10 |
44 ; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
45 ; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
46 ; CHECK-SUCCINCT-NEXT: 13 | }
47 ; CHECK-SUCCINCT-NEXT: 14 |
4848
11 RUN: llvm-opt-report -s -r %p %p/Inputs/qx.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
22
33 ; CHECK: < {{.*[/\]}}q.cpp
4 ; CHECK-NEXT: 2 | void bar();
5 ; CHECK-NEXT: 3 | void foo(int n) {
6 ; CHECK-NEXT: {{\[\[}}
4 ; CHECK-NEXT: 1 | void bar();
5 ; CHECK-NEXT: 2 | void foo(int n) {
6 ; CHECK-NEXT: {{\[\[}}
77 ; CHECK-NEXT: > foo(int):
8 ; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i)
8 ; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i)
99 ; CHECK-NEXT: > quack(), quack2():
10 ; CHECK-NEXT: 4 U4 | for (int i = 0; i < n; ++i)
11 ; CHECK-NEXT: {{\]\]}}
12 ; CHECK-NEXT: 5 | bar();
13 ; CHECK-NEXT: 6 | }
14 ; CHECK-NEXT: 7 |
15 ; CHECK-NEXT: 8 | void quack() {
16 ; CHECK-NEXT: 9 I | foo(4);
17 ; CHECK-NEXT: 10 | }
18 ; CHECK-NEXT: 11 |
19 ; CHECK-NEXT: 12 | void quack2() {
20 ; CHECK-NEXT: 13 I | foo(4);
21 ; CHECK-NEXT: 14 | }
22 ; CHECK-NEXT: 15 |
10 ; CHECK-NEXT: 3 U4 | for (int i = 0; i < n; ++i)
11 ; CHECK-NEXT: {{\]\]}}
12 ; CHECK-NEXT: 4 | bar();
13 ; CHECK-NEXT: 5 | }
14 ; CHECK-NEXT: 6 |
15 ; CHECK-NEXT: 7 | void quack() {
16 ; CHECK-NEXT: 8 I | foo(4);
17 ; CHECK-NEXT: 9 | }
18 ; CHECK-NEXT: 10 |
19 ; CHECK-NEXT: 11 | void quack2() {
20 ; CHECK-NEXT: 12 I | foo(4);
21 ; CHECK-NEXT: 13 | }
22 ; CHECK-NEXT: 14 |
2323
2424 ; CHECK-SUCCINCT: < {{.*[/\]}}q.cpp
25 ; CHECK-SUCCINCT-NEXT: 2 | void bar();
26 ; CHECK-SUCCINCT-NEXT: 3 | void foo(int n) {
27 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
25 ; CHECK-SUCCINCT-NEXT: 1 | void bar();
26 ; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
27 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
2828 ; CHECK-SUCCINCT-NEXT: > foo(int):
29 ; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i)
29 ; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i)
3030 ; CHECK-SUCCINCT-NEXT: > quack(), quack2():
31 ; CHECK-SUCCINCT-NEXT: 4 U | for (int i = 0; i < n; ++i)
32 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
33 ; CHECK-SUCCINCT-NEXT: 5 | bar();
34 ; CHECK-SUCCINCT-NEXT: 6 | }
35 ; CHECK-SUCCINCT-NEXT: 7 |
36 ; CHECK-SUCCINCT-NEXT: 8 | void quack() {
37 ; CHECK-SUCCINCT-NEXT: 9 I | foo(4);
38 ; CHECK-SUCCINCT-NEXT: 10 | }
39 ; CHECK-SUCCINCT-NEXT: 11 |
40 ; CHECK-SUCCINCT-NEXT: 12 | void quack2() {
41 ; CHECK-SUCCINCT-NEXT: 13 I | foo(4);
42 ; CHECK-SUCCINCT-NEXT: 14 | }
43 ; CHECK-SUCCINCT-NEXT: 15 |
31 ; CHECK-SUCCINCT-NEXT: 3 U | for (int i = 0; i < n; ++i)
32 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
33 ; CHECK-SUCCINCT-NEXT: 4 | bar();
34 ; CHECK-SUCCINCT-NEXT: 5 | }
35 ; CHECK-SUCCINCT-NEXT: 6 |
36 ; CHECK-SUCCINCT-NEXT: 7 | void quack() {
37 ; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
38 ; CHECK-SUCCINCT-NEXT: 9 | }
39 ; CHECK-SUCCINCT-NEXT: 10 |
40 ; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
41 ; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
42 ; CHECK-SUCCINCT-NEXT: 13 | }
43 ; CHECK-SUCCINCT-NEXT: 14 |
4444
11 RUN: llvm-opt-report -s -r %p %p/Inputs/q.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
22
33 ; CHECK: < {{.*[/\]}}q.c
4 ; CHECK-NEXT: 2 | void bar();
5 ; CHECK-NEXT: 3 | void foo(int n) {
6 ; CHECK-NEXT: {{\[\[}}
4 ; CHECK-NEXT: 1 | void bar();
5 ; CHECK-NEXT: 2 | void foo(int n) {
6 ; CHECK-NEXT: {{\[\[}}
77 ; CHECK-NEXT: > foo:
8 ; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i)
8 ; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i)
99 ; CHECK-NEXT: > quack, quack2:
10 ; CHECK-NEXT: 4 U4 | for (int i = 0; i < n; ++i)
11 ; CHECK-NEXT: {{\]\]}}
12 ; CHECK-NEXT: 5 | bar();
13 ; CHECK-NEXT: 6 | }
14 ; CHECK-NEXT: 7 |
15 ; CHECK-NEXT: 8 | void quack() {
16 ; CHECK-NEXT: 9 I | foo(4);
17 ; CHECK-NEXT: 10 | }
18 ; CHECK-NEXT: 11 |
19 ; CHECK-NEXT: 12 | void quack2() {
20 ; CHECK-NEXT: 13 I | foo(4);
21 ; CHECK-NEXT: 14 | }
22 ; CHECK-NEXT: 15 |
10 ; CHECK-NEXT: 3 U4 | for (int i = 0; i < n; ++i)
11 ; CHECK-NEXT: {{\]\]}}
12 ; CHECK-NEXT: 4 | bar();
13 ; CHECK-NEXT: 5 | }
14 ; CHECK-NEXT: 6 |
15 ; CHECK-NEXT: 7 | void quack() {
16 ; CHECK-NEXT: 8 I | foo(4);
17 ; CHECK-NEXT: 9 | }
18 ; CHECK-NEXT: 10 |
19 ; CHECK-NEXT: 11 | void quack2() {
20 ; CHECK-NEXT: 12 I | foo(4);
21 ; CHECK-NEXT: 13 | }
22 ; CHECK-NEXT: 14 |
2323
2424 ; CHECK-SUCCINCT: < {{.*[/\]}}q.c
25 ; CHECK-SUCCINCT-NEXT: 2 | void bar();
26 ; CHECK-SUCCINCT-NEXT: 3 | void foo(int n) {
27 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
25 ; CHECK-SUCCINCT-NEXT: 1 | void bar();
26 ; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
27 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
2828 ; CHECK-SUCCINCT-NEXT: > foo:
29 ; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i)
29 ; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i)
3030 ; CHECK-SUCCINCT-NEXT: > quack, quack2:
31 ; CHECK-SUCCINCT-NEXT: 4 U | for (int i = 0; i < n; ++i)
32 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
33 ; CHECK-SUCCINCT-NEXT: 5 | bar();
34 ; CHECK-SUCCINCT-NEXT: 6 | }
35 ; CHECK-SUCCINCT-NEXT: 7 |
36 ; CHECK-SUCCINCT-NEXT: 8 | void quack() {
37 ; CHECK-SUCCINCT-NEXT: 9 I | foo(4);
38 ; CHECK-SUCCINCT-NEXT: 10 | }
39 ; CHECK-SUCCINCT-NEXT: 11 |
40 ; CHECK-SUCCINCT-NEXT: 12 | void quack2() {
41 ; CHECK-SUCCINCT-NEXT: 13 I | foo(4);
42 ; CHECK-SUCCINCT-NEXT: 14 | }
43 ; CHECK-SUCCINCT-NEXT: 15 |
31 ; CHECK-SUCCINCT-NEXT: 3 U | for (int i = 0; i < n; ++i)
32 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
33 ; CHECK-SUCCINCT-NEXT: 4 | bar();
34 ; CHECK-SUCCINCT-NEXT: 5 | }
35 ; CHECK-SUCCINCT-NEXT: 6 |
36 ; CHECK-SUCCINCT-NEXT: 7 | void quack() {
37 ; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
38 ; CHECK-SUCCINCT-NEXT: 9 | }
39 ; CHECK-SUCCINCT-NEXT: 10 |
40 ; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
41 ; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
42 ; CHECK-SUCCINCT-NEXT: 13 | }
43 ; CHECK-SUCCINCT-NEXT: 14 |
4444
431431 return RS.str();
432432 };
433433
434 OS << llvm::format_decimal(L + 1, LNDigits) << " ";
434 OS << llvm::format_decimal(L, LNDigits) << " ";
435435 OS << (LLI.Inlined.Transformed && InlinedCols < 2 ? "I" : " ");
436436 OS << (LLI.Unrolled.Transformed && UnrolledCols < 2 ?
437437 "U" + UStr(LLI) : " " + USpaces);