1 ## Check that we can dump an offloading binary directly.
2 # RUN: yaml2obj %S/Inputs/binary.yaml -o %t.bin
3 # RUN: llvm-objdump --offloading %t.bin | FileCheck %s --match-full-lines --strict-whitespace --implicit-check-not={{.}}
5 ## Check that we can dump an offloading binary inside of an ELF section.
6 # RUN: yaml2obj %s -o %t -DTYPE=ET_EXEC
7 # RUN: yaml2obj %s -o %t.so -DTYPE=ET_DYN
8 # RUN: yaml2obj %s -o %t.o -DTYPE=ET_REL
9 # RUN: llvm-objcopy --update-section .llvm.offloading=%t.bin %t
10 # RUN: llvm-objcopy --update-section .llvm.offloading=%t.bin %t.so
11 # RUN: llvm-objcopy --update-section .llvm.offloading=%t.bin %t.o
12 # RUN: llvm-objdump --offloading %t | FileCheck %s --check-prefixes=CHECK,ELF --match-full-lines --strict-whitespace --implicit-check-not={{.}}
13 # RUN: llvm-objdump --offloading %t.so | FileCheck %s --check-prefixes=CHECK,ELF --match-full-lines --strict-whitespace --implicit-check-not={{.}}
14 # RUN: llvm-objdump --offloading %t.o | FileCheck %s --check-prefixes=CHECK,ELF --match-full-lines --strict-whitespace --implicit-check-not={{.}}
22 - Name: .llvm.offloading
23 Type: SHT_LLVM_OFFLOADING
24 Flags: [ SHF_EXCLUDE ]
25 AddressAlign: 0x0000000000000008
27 # ELF:{{.*}}file format elf64-unknown
29 # CHECK:OFFLOADING IMAGE [0]:
30 # CHECK-NEXT:kind llvm ir
31 # CHECK-NEXT:arch gfx908
32 # CHECK-NEXT:triple amdgcn-amd-amdhsa
33 # CHECK-NEXT:producer openmp
35 # CHECK-NEXT:OFFLOADING IMAGE [1]:
36 # CHECK-NEXT:kind llvm ir
37 # CHECK-NEXT:arch gfx90a
38 # CHECK-NEXT:triple amdgcn-amd-amdhsa
39 # CHECK-NEXT:producer openmp
41 # CHECK-NEXT:OFFLOADING IMAGE [2]:
42 # CHECK-NEXT:kind cubin
43 # CHECK-NEXT:arch sm_52
44 # CHECK-NEXT:triple nvptx64-nvidia-cuda
45 # CHECK-NEXT:producer openmp
47 # CHECK-NEXT:OFFLOADING IMAGE [3]:
48 # CHECK-NEXT:kind <none>
49 # CHECK-NEXT:arch sm_70
50 # CHECK-NEXT:triple nvptx64-nvidia-cuda
51 # CHECK-NEXT:producer none