xref: /aosp_15_r20/external/llvm/test/CodeGen/AMDGPU/elf.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=SI -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=SI -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TYPICAL %s
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
4*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TONGA %s
5*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=carrizo -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
6*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=amdgcn -mcpu=carrizo -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TYPICAL %s
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker; Test that we don't try to produce a COFF file on windows
9*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=amdgcn-pc-mingw -mcpu=SI -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; ELF: Format: ELF64
12*9880d681SAndroid Build Coastguard Worker; ELF: OS/ABI: AMDGPU_HSA (0x40)
13*9880d681SAndroid Build Coastguard Worker; ELF: Machine: EM_AMDGPU (0xE0)
14*9880d681SAndroid Build Coastguard Worker; ELF: Name: .AMDGPU.config
15*9880d681SAndroid Build Coastguard Worker; ELF: Type: SHT_PROGBITS
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker; ELF: Symbol {
18*9880d681SAndroid Build Coastguard Worker; ELF: Name: test
19*9880d681SAndroid Build Coastguard Worker; ELF: Binding: Global
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker; CONFIG: .section .AMDGPU.config
22*9880d681SAndroid Build Coastguard Worker; CONFIG-NEXT: .long   45096
23*9880d681SAndroid Build Coastguard Worker; TYPICAL-NEXT: .long   0
24*9880d681SAndroid Build Coastguard Worker; TONGA-NEXT: .long   576
25*9880d681SAndroid Build Coastguard Worker; CONFIG: .p2align 8
26*9880d681SAndroid Build Coastguard Worker; CONFIG: test:
27*9880d681SAndroid Build Coastguard Workerdefine amdgpu_ps void @test(i32 %p) {
28*9880d681SAndroid Build Coastguard Worker   %i = add i32 %p, 2
29*9880d681SAndroid Build Coastguard Worker   %r = bitcast i32 %i to float
30*9880d681SAndroid Build Coastguard Worker   call void @llvm.SI.export(i32 15, i32 0, i32 1, i32 12, i32 0, float %r, float %r, float %r, float %r)
31*9880d681SAndroid Build Coastguard Worker   ret void
32*9880d681SAndroid Build Coastguard Worker}
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
35