[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / pragma-loop-safety-nested.cpp
blob35fd21395763386b17e71a82b93070fe0d8fe1ce
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
3 // Verify that the outer loop has the llvm.access.group property for the
4 // accesses outside and inside the inner loop.
5 void vectorize_nested_test(int *List, int Length) {
6 #pragma clang loop vectorize(assume_safety) interleave(disable) unroll(disable)
7 for (int i = 0; i < Length; ++i) {
8 #pragma clang loop vectorize(assume_safety) interleave(disable) unroll(disable)
9 for (int j = 0; j < Length; ++j)
10 List[i * Length + j] = (i + j) * 2;
15 // CHECK: load i32, i32* %Length.addr, align 4, !llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
16 // CHECK: %[[MUL:.+]] = mul
17 // CHECK: store i32 %[[MUL]], i32* %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_LIST_3:[0-9]+]]
18 // CHECK: br label %{{.+}}, !llvm.loop ![[INNER_LOOPID:[0-9]+]]
19 // CHECK: br label %{{.+}}, !llvm.loop ![[OUTER_LOOPID:[0-9]+]]
21 // CHECK: ![[ACCESS_GROUP_2]] = distinct !{}
22 // CHECK: ![[ACCESS_GROUP_LIST_3]] = !{![[ACCESS_GROUP_2]], ![[ACCESS_GROUP_4:[0-9]+]]}
23 // CHECK: ![[ACCESS_GROUP_4]] = distinct !{}
24 // CHECK: ![[INNER_LOOPID]] = distinct !{![[INNER_LOOPID]], [[MP:![0-9]+]], ![[PARALLEL_ACCESSES_8:[0-9]+]]
25 // CHECK: ![[PARALLEL_ACCESSES_8]] = !{!"llvm.loop.parallel_accesses", ![[ACCESS_GROUP_4]]}
26 // CHECK: ![[OUTER_LOOPID]] = distinct !{![[OUTER_LOOPID]], [[MP]], ![[PARALLEL_ACCESSES_10:[0-9]+]]
27 // CHECK: ![[PARALLEL_ACCESSES_10]] = !{!"llvm.loop.parallel_accesses", ![[ACCESS_GROUP_2]]}