Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / amdgpu_throw_trap.cpp
blob82b325275ac388523b6f32d72c8f85c9b6177536
1 // REQUIRES: amdgpu-registered-target, x86-registered-target
3 // RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device %s -emit-llvm -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s
4 // RUN: %clang_cc1 -fopenmp -triple x86_64-pc-linux-gnu -fopenmp-is-target-device -fcxx-exceptions %s -emit-llvm -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=HOST %s
5 // DEVICE: s_trap
6 // DEVICE-NOT: __cxa_throw
7 // HOST: __cxa_throw
8 // HOST-NOT: s_trap
9 #pragma omp declare target
10 void foo(void) {
11 throw 404;
13 #pragma omp end declare target