Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / constexpr_capture.cpp
bloba85442e11ac30baa88747459a2e4435c0c5afc8a
1 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-linux -S -emit-llvm %s -o - -std=c++11 2>&1 | FileCheck %s
2 // RUN: %clang_cc1 -verify -fopenmp -x c++ -fopenmp-targets=x86_64-pc-linux-gnu -triple powerpc64le-unknown-linux -S -emit-llvm %s -o - -std=c++11 2>&1 | FileCheck %s
3 // expected-no-diagnostics
5 template <int __v> struct integral_constant {
6 static constexpr int value = __v;
7 };
9 template <typename _Tp, int v = 0, bool _IsArray = integral_constant<v>::value>
10 struct decay {
11 typedef int type;
13 struct V {
14 template <typename TArg0 = int, typename = typename decay<TArg0>::type> V();
17 constexpr double h_chebyshev_coefs[] = {
18 1.0000020784639703, 0.0021491446496202074};
20 void test(double *d_value)
22 #pragma omp target map(tofrom \
23 : d_value [0:1]) map(always, to \
24 : h_chebyshev_coefs [0:2])
25 *d_value = h_chebyshev_coefs[1]; return;
28 // CHECK: void @__omp_offloading_{{.+}}test{{.+}}(ptr %0)
30 int main() {
31 #pragma omp target
32 V v;
33 return 0;
36 // CHECK: call void @__omp_offloading_{{.+}}_main_{{.+}}()