Home | History | Annotate | Download | only in AMDGPU
      1 ; RUN: llc < %s -march=amdgcn -mcpu=SI -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
      2 ; RUN: llc < %s -march=amdgcn -mcpu=SI -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TYPICAL %s
      3 ; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
      4 ; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TONGA %s
      5 ; RUN: llc < %s -march=amdgcn -mcpu=carrizo -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
      6 ; RUN: llc < %s -march=amdgcn -mcpu=carrizo -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TYPICAL %s
      7 
      8 ; Test that we don't try to produce a COFF file on windows
      9 ; 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 
     11 ; ELF: Format: ELF64
     12 ; ELF: OS/ABI: AMDGPU_HSA (0x40)
     13 ; ELF: Machine: EM_AMDGPU (0xE0)
     14 ; ELF: Name: .AMDGPU.config
     15 ; ELF: Type: SHT_PROGBITS
     16 
     17 ; ELF: Symbol {
     18 ; ELF: Name: test
     19 ; ELF: Binding: Global
     20 
     21 ; CONFIG: .section .AMDGPU.config
     22 ; CONFIG-NEXT: .long   45096
     23 ; TYPICAL-NEXT: .long   0
     24 ; TONGA-NEXT: .long   576
     25 ; CONFIG: .align 256
     26 ; CONFIG: test:
     27 define void @test(i32 %p) #0 {
     28    %i = add i32 %p, 2
     29    %r = bitcast i32 %i to float
     30    call void @llvm.SI.export(i32 15, i32 0, i32 1, i32 12, i32 0, float %r, float %r, float %r, float %r)
     31    ret void
     32 }
     33 
     34 declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
     35 
     36 attributes #0 = { "ShaderType"="0" } ; Pixel Shader
     37