eopXD created this revision. Herald added a project: All. eopXD requested review of this revision. Herald added subscribers: cfe-commits, pcwang-thead. Herald added a project: clang.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D136783 Files: clang/test/Parser/pragma-loop.cpp Index: clang/test/Parser/pragma-loop.cpp =================================================================== --- clang/test/Parser/pragma-loop.cpp +++ clang/test/Parser/pragma-loop.cpp @@ -301,3 +301,39 @@ void foo(void) { #pragma clang loop vectorize_predicate(enable) /* expected-error {{expected statement}} */ } + +void foo(int *List, int Length) { + int i; +#pragma clang loop vectorize(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop interleave(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop unroll(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop vectorize_predicate(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop pipeline(disable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop vectorize_width(2, scalable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop interleave_count(2, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop unroll_count(2, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop pipeline_initiation_interval(2, extra) + while (i-6 < Length) { + List[i] = i; + } +}
Index: clang/test/Parser/pragma-loop.cpp =================================================================== --- clang/test/Parser/pragma-loop.cpp +++ clang/test/Parser/pragma-loop.cpp @@ -301,3 +301,39 @@ void foo(void) { #pragma clang loop vectorize_predicate(enable) /* expected-error {{expected statement}} */ } + +void foo(int *List, int Length) { + int i; +#pragma clang loop vectorize(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop interleave(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop unroll(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop vectorize_predicate(enable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +#pragma clang loop pipeline(disable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ while (i-6 < Length) { + List[i] = i; + } + +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop vectorize_width(2, scalable, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop interleave_count(2, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop unroll_count(2, extra) +/* expected-warning {{extra tokens at end of '#pragma clang loop loop' - ignored}}*/ #pragma clang loop pipeline_initiation_interval(2, extra) + while (i-6 < Length) { + List[i] = i; + } +}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits