| 1 |
// Verify the ELF packaging of OpenMP SPIR-V device images. |
| 2 |
// REQUIRES: system-linux |
| 3 |
// REQUIRES: spirv-tools |
| 4 |
// REQUIRES: spirv-registered-target |
| 5 |
// RUN: mkdir -p %t_tmp |
| 6 |
// RUN: cd %t_tmp |
| 7 |
// RUN: %clangxx -fopenmp -fopenmp-targets=spirv64-intel -nogpulib -c -o %t_clang-linker-wrapper-spirv-elf.o %s |
| 8 |
// RUN: not clang-linker-wrapper -o a.out %t_clang-linker-wrapper-spirv-elf.o --save-temps --linker-path=ld |
| 9 |
// RUN: llvm-offload-binary --image=triple=spirv64-intel,kind=openmp,file=%t.elf %t_tmp/a.out.openmp.image.wrapper.o |
| 10 |
// RUN: llvm-readelf -h %t.elf | FileCheck -check-prefix=CHECK-MACHINE %s |
| 11 |
// RUN: llvm-readelf -t %t.elf | FileCheck -check-prefix=CHECK-SECTION %s |
| 12 |
// RUN: llvm-readelf -n %t.elf | FileCheck -check-prefix=CHECK-NOTES %s |
| 13 |
|
| 14 |
// CHECK-MACHINE: Machine: Intel Graphics Technology |
| 15 |
|
| 16 |
// CHECK-SECTION: .note.inteloneompoffload |
| 17 |
// CHECK-SECTION: __openmp_offload_spirv_0 |
| 18 |
|
| 19 |
// CHECK-NOTES-COUNT-3: INTELONEOMPOFFLOAD |
| 20 |
int main(int argc, char** argv) { |
| 21 |
return 0; |
| 22 |
} |