Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / target_codegen_ref_assertion_vh.cpp
blobf5600867b0df94bae343e911457fb4febec7b52c
1 // REQUIRES: nvptx-registered-target
2 //
3 // Test target codegen - host bc file has to be created first.
4 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
5 // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o %t.final
6 // expected-no-diagnostics
8 #pragma omp begin declare target
9 constexpr int A[] = {1,2,3,4,5};
10 int f(int i) { return A[i]; }
11 #pragma omp end declare target