diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-line-if.cpp | 28 | ||||
-rw-r--r-- | clang/test/Frontend/optimization-remark-options.c | 2 | ||||
-rw-r--r-- | clang/test/Misc/backend-optimization-failure.cpp | 2 |
3 files changed, 22 insertions, 10 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-line-if.cpp b/clang/test/CodeGenCXX/debug-info-line-if.cpp index 29806351c94..b3f9c32e091 100644 --- a/clang/test/CodeGenCXX/debug-info-line-if.cpp +++ b/clang/test/CodeGenCXX/debug-info-line-if.cpp @@ -15,7 +15,7 @@ int main() { // CHECK: br label // CHECK: br label - // CHECK: br label {{.*}}, !dbg [[DBG1:!.*]] + // CHECK: br label {{.*}}, !dbg [[DBG1:![0-9]*]], !llvm.loop [[L1:![0-9]*]] #line 200 while (a) @@ -25,7 +25,7 @@ int main() { ++a; // CHECK: add nsw{{.*}}, 1 // CHECK: br label - // CHECK: br label {{.*}}, !dbg [[DBG2:!.*]] + // CHECK: br label {{.*}}, !dbg [[DBG2:![0-9]*]], !llvm.loop [[L2:![0-9]*]] #line 300 for (; a; ) @@ -35,7 +35,7 @@ int main() { ++a; // CHECK: add nsw{{.*}}, 1 // CHECK: br label - // CHECK: br label {{.*}}, !dbg [[DBG3:!.*]] + // CHECK: br label {{.*}}, !dbg [[DBG3:![0-9]*]], !llvm.loop [[L3:![0-9]*]] #line 400 int x[] = {1, 2}; @@ -46,10 +46,22 @@ int main() { ++a; // CHECK: add nsw{{.*}}, 1 // CHECK: br label - // CHECK: br label {{.*}}, !dbg [[DBG4:!.*]] + // CHECK: br label {{.*}}, !dbg [[DBG4:![0-9]*]], !llvm.loop [[L4:![0-9]*]] - // CHECK: [[DBG1]] = !DILocation(line: 100, scope: !{{.*}}) - // CHECK: [[DBG2]] = !DILocation(line: 200, scope: !{{.*}}) - // CHECK: [[DBG3]] = !DILocation(line: 300, scope: !{{.*}}) - // CHECK: [[DBG4]] = !DILocation(line: 401, scope: !{{.*}}) + // CHECK-DAG: [[DBG1]] = !DILocation(line: 100, scope: !{{.*}}) + // CHECK-DAG: [[DBG2]] = !DILocation(line: 200, scope: !{{.*}}) + // CHECK-DAG: [[DBG3]] = !DILocation(line: 300, scope: !{{.*}}) + // CHECK-DAG: [[DBG4]] = !DILocation(line: 401, scope: !{{.*}}) + + // CHECK-DAG: [[L1]] = distinct !{[[L1]], [[LDBG1:![0-9]*]]} + // CHECK-DAG: [[LDBG1]] = !DILocation(line: 100, scope: !{{.*}}) + + // CHECK-DAG: [[L2]] = distinct !{[[L2]], [[LDBG2:![0-9]*]]} + // CHECK-DAG: [[LDBG2]] = !DILocation(line: 200, scope: !{{.*}}) + + // CHECK-DAG: [[L3]] = distinct !{[[L3]], [[LDBG3:![0-9]*]]} + // CHECK-DAG: [[LDBG3]] = !DILocation(line: 300, scope: !{{.*}}) + + // CHECK-DAG: [[L4]] = distinct !{[[L4]], [[LDBG4:![0-9]*]]} + // CHECK-DAG: [[LDBG4]] = !DILocation(line: 401, scope: !{{.*}}) } diff --git a/clang/test/Frontend/optimization-remark-options.c b/clang/test/Frontend/optimization-remark-options.c index 74fbeaf5d0c..a2d717a2422 100644 --- a/clang/test/Frontend/optimization-remark-options.c +++ b/clang/test/Frontend/optimization-remark-options.c @@ -11,7 +11,7 @@ double foo(int N) { return v; } -// CHECK: {{.*}}:18:13: remark: loop not vectorized: cannot prove it is safe to reorder memory operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop. If the arrays will always be independent specify '#pragma clang loop vectorize(assume_safety)' before the loop or provide the '__restrict__' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied! +// CHECK: {{.*}}:17:3: remark: loop not vectorized: cannot prove it is safe to reorder memory operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop. If the arrays will always be independent specify '#pragma clang loop vectorize(assume_safety)' before the loop or provide the '__restrict__' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied! void foo2(int *dw, int *uw, int *A, int *B, int *C, int *D, int N) { for (int i = 0; i < N; i++) { diff --git a/clang/test/Misc/backend-optimization-failure.cpp b/clang/test/Misc/backend-optimization-failure.cpp index c0f3bf46f08..bb50e96aaa5 100644 --- a/clang/test/Misc/backend-optimization-failure.cpp +++ b/clang/test/Misc/backend-optimization-failure.cpp @@ -7,7 +7,7 @@ void test_switch(int *A, int *B, int Length) { #pragma clang loop vectorize(enable) unroll(disable) for (int i = 0; i < Length; i++) { -/* expected-warning {{loop not vectorized: failed explicitly specified loop vectorization}} */ switch (A[i]) { +/* expected-warning@-1 {{loop not vectorized: failed explicitly specified loop vectorization}} */ switch (A[i]) { case 0: B[i] = 1; break; |