brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · 022bf85 Raw
72 lines · cpp
1// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=51 -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s2// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s3// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s4// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=51 -fopenmp-enable-irbuilder -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s5// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fopenmp-enable-irbuilder -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s6// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -fopenmp-enable-irbuilder -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s7 8// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=60 -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s9// RUN: %clang_cc1 -fopenmp -fopenmp-version=60 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s10// RUN: %clang_cc1 -fopenmp -fopenmp-version=60 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s11// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=60 -fopenmp-enable-irbuilder -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s12// RUN: %clang_cc1 -fopenmp -fopenmp-version=60 -fopenmp-enable-irbuilder -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s13// RUN: %clang_cc1 -fopenmp -fopenmp-version=60 -fopenmp-enable-irbuilder -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s14 15// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=51 -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY0 %s16// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=51 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s17// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=51 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s18// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}19 20// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=60 -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY0 %s21// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=60 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s22// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=60 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s23// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}24// expected-no-diagnostics25#ifndef HEADER26#define HEADER27 28template <class T>29T tmain(T argc) {30  static T a;31#pragma omp flush32#pragma omp flush seq_cst33#pragma omp flush acq_rel34#pragma omp flush acquire35#pragma omp flush release36#pragma omp flush(a)37  return a + argc;38}39 40// CHECK-LABEL: @main41int main() {42  static int a;43#pragma omp flush44#pragma omp flush seq_cst45#pragma omp flush acq_rel46#pragma omp flush acquire47#pragma omp flush release48#pragma omp flush(a)49  // CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})50  // CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})51  // CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})52  // CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})53  // CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})54  // CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})55  return tmain(a);56  // CHECK: call {{.*}} [[TMAIN:@.+]](57  // CHECK: ret58}59 60// CHECK: [[TMAIN]]61// CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})62// CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})63// CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})64// CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})65// CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})66// CHECK: call {{.*}}void @__kmpc_flush(ptr {{(@|%).+}})67// CHECK: ret68 69// CHECK-NOT: line: 0,70 71#endif72