basic.test
4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
RUN: llvm-opt-report -r %p %p/Inputs/or.yaml | FileCheck -strict-whitespace %s
RUN: llvm-opt-report -s -r %p %p/Inputs/or.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
; CHECK: < {{.*[/\]}}or.c
; CHECK-NEXT: 1 | void bar();
; CHECK-NEXT: 2 | void foo() { bar(); }
; CHECK-NEXT: 3 |
; CHECK-NEXT: 4 | #include "or.h"
; CHECK-NEXT: 5 |
; CHECK-NEXT: 6 | void Test(int *res, int *c, int *d, int *p, int n) {
; CHECK-NEXT: 7 | int i;
; CHECK-NEXT: 8 |
; CHECK-NEXT: 9 | #pragma clang loop vectorize(assume_safety)
; CHECK-NEXT: 10 V4,2 | for (i = 0; i < 1600; i++) {
; CHECK-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-NEXT: 12 | }
; CHECK-NEXT: 13 |
; CHECK-NEXT: 14 U16 | for (i = 0; i < 16; i++) {
; CHECK-NEXT: 15 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-NEXT: 16 | }
; CHECK-NEXT: 17 |
; CHECK-NEXT: 18 I | foo();
; CHECK-NEXT: 19 |
; CHECK-NEXT: 20 | foo(); bar(); foo();
; CHECK-NEXT: I | ^
; CHECK-NEXT: I | ^
; CHECK-NEXT: 21 | }
; CHECK-NEXT: 22 |
; CHECK: < {{.*[/\]}}or.h
; CHECK-NEXT: 1 | void TestH(int *res, int *c, int *d, int *p, int n) {
; CHECK-NEXT: 2 | int i;
; CHECK-NEXT: 3 |
; CHECK-NEXT: 4 | #pragma clang loop vectorize(assume_safety)
; CHECK-NEXT: 5 V4,2 | for (i = 0; i < 1600; i++) {
; CHECK-NEXT: 6 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-NEXT: 7 | }
; CHECK-NEXT: 8 |
; CHECK-NEXT: 9 U16 | for (i = 0; i < 16; i++) {
; CHECK-NEXT: 10 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-NEXT: 11 | }
; CHECK-NEXT: 12 |
; CHECK-NEXT: 13 I | foo();
; CHECK-NEXT: 14 |
; CHECK-NEXT: 15 | foo(); bar(); foo();
; CHECK-NEXT: I | ^
; CHECK-NEXT: I | ^
; CHECK-NEXT: 16 | }
; CHECK-NEXT: 17 |
; CHECK-SUCCINCT: < {{.*[/\]}}or.c
; CHECK-SUCCINCT-NEXT: 1 | void bar();
; CHECK-SUCCINCT-NEXT: 2 | void foo() { bar(); }
; CHECK-SUCCINCT-NEXT: 3 |
; CHECK-SUCCINCT-NEXT: 4 | #include "or.h"
; CHECK-SUCCINCT-NEXT: 5 |
; CHECK-SUCCINCT-NEXT: 6 | void Test(int *res, int *c, int *d, int *p, int n) {
; CHECK-SUCCINCT-NEXT: 7 | int i;
; CHECK-SUCCINCT-NEXT: 8 |
; CHECK-SUCCINCT-NEXT: 9 | #pragma clang loop vectorize(assume_safety)
; CHECK-SUCCINCT-NEXT: 10 V | for (i = 0; i < 1600; i++) {
; CHECK-SUCCINCT-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-SUCCINCT-NEXT: 12 | }
; CHECK-SUCCINCT-NEXT: 13 |
; CHECK-SUCCINCT-NEXT: 14 U | for (i = 0; i < 16; i++) {
; CHECK-SUCCINCT-NEXT: 15 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-SUCCINCT-NEXT: 16 | }
; CHECK-SUCCINCT-NEXT: 17 |
; CHECK-SUCCINCT-NEXT: 18 I | foo();
; CHECK-SUCCINCT-NEXT: 19 |
; CHECK-SUCCINCT-NEXT: 20 | foo(); bar(); foo();
; CHECK-SUCCINCT-NEXT: I | ^
; CHECK-SUCCINCT-NEXT: I | ^
; CHECK-SUCCINCT-NEXT: 21 | }
; CHECK-SUCCINCT-NEXT: 22 |
CHECK-SUCCINCT: < {{.*[/\]}}or.h
; CHECK-SUCCINCT-NEXT: 1 | void TestH(int *res, int *c, int *d, int *p, int n) {
; CHECK-SUCCINCT-NEXT: 2 | int i;
; CHECK-SUCCINCT-NEXT: 3 |
; CHECK-SUCCINCT-NEXT: 4 | #pragma clang loop vectorize(assume_safety)
; CHECK-SUCCINCT-NEXT: 5 V | for (i = 0; i < 1600; i++) {
; CHECK-SUCCINCT-NEXT: 6 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-SUCCINCT-NEXT: 7 | }
; CHECK-SUCCINCT-NEXT: 8 |
; CHECK-SUCCINCT-NEXT: 9 U | for (i = 0; i < 16; i++) {
; CHECK-SUCCINCT-NEXT: 10 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
; CHECK-SUCCINCT-NEXT: 11 | }
; CHECK-SUCCINCT-NEXT: 12 |
; CHECK-SUCCINCT-NEXT: 13 I | foo();
; CHECK-SUCCINCT-NEXT: 14 |
; CHECK-SUCCINCT-NEXT: 15 | foo(); bar(); foo();
; CHECK-SUCCINCT-NEXT: I | ^
; CHECK-SUCCINCT-NEXT: I | ^
; CHECK-SUCCINCT-NEXT: 16 | }
; CHECK-SUCCINCT-NEXT: 17 |