Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / depend_iterator_bug.c
blobb4aaaac08374f1b5e2f8aa7d6f60e58a9f828ef6
1 // RUN: %clang_cc1 -verify -fopenmp -triple x86_64-unknown-linux-gnu \
2 // RUN: -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
4 // expected-no-diagnostics
6 int x[100];
7 int y[100];
9 // CHECK-LABEL: @many_iterators_single_clause(
10 // CHECK: [[VLA:%.*]] = alloca [[STRUCT_KMP_DEPEND_INFO:%.*]], i64 10, align 16
11 // CHECK: = call i32 @__kmpc_omp_task_with_deps(ptr {{.*}}, i32 {{.*}}, ptr {{.*}}, i32 10, ptr {{.*}}, i32 0, ptr null)
12 void many_iterators_single_clause(void) {
13 #pragma omp task depend(iterator(j=0:5), in: x[j], y[j])
18 // CHECK-LABEL: @many_iterators_many_clauses(
19 // CHECK: [[VLA:%.*]] = alloca [[STRUCT_KMP_DEPEND_INFO:%.*]], i64 10, align 16
20 // CHECK: = call i32 @__kmpc_omp_task_with_deps(ptr {{.*}}, i32 {{.*}}, ptr {{.*}}, i32 10, ptr {{.*}}, i32 0, ptr null)
21 void many_iterators_many_clauses(void) {
22 #pragma omp task depend(iterator(j=0:5), in: x[j]) \
23 depend(iterator(j=0:5), in: y[j])