2015-06-23 05:03:52 +08:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=SI -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
2015-03-09 23:48:09 +08:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=SI -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TYPICAL %s
|
2015-06-23 05:03:52 +08:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
2015-03-09 23:48:09 +08:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TONGA %s
|
2015-06-23 05:03:52 +08:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=carrizo -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
2015-03-09 23:48:09 +08:00
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=carrizo -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TYPICAL %s
|
2013-04-16 01:51:21 +08:00
|
|
|
|
2015-03-19 06:19:16 +08:00
|
|
|
; Test that we don't try to produce a COFF file on windows
|
2015-06-23 05:03:52 +08:00
|
|
|
; RUN: llc < %s -mtriple=amdgcn-pc-mingw -mcpu=SI -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
2015-03-19 06:19:16 +08:00
|
|
|
|
2015-06-23 05:03:54 +08:00
|
|
|
; ELF: Format: ELF64
|
2015-06-27 05:15:11 +08:00
|
|
|
; ELF: OS/ABI: AMDGPU_HSA (0x40)
|
2015-06-23 05:03:52 +08:00
|
|
|
; ELF: Machine: EM_AMDGPU (0xE0)
|
2015-02-04 05:53:27 +08:00
|
|
|
; ELF: Name: .AMDGPU.config
|
|
|
|
; ELF: Type: SHT_PROGBITS
|
2013-04-16 01:51:35 +08:00
|
|
|
|
2015-02-04 05:53:27 +08:00
|
|
|
; ELF: Symbol {
|
|
|
|
; ELF: Name: test
|
|
|
|
; ELF: Binding: Global
|
2014-12-06 13:34:34 +08:00
|
|
|
|
2015-02-04 05:53:27 +08:00
|
|
|
; CONFIG: .section .AMDGPU.config
|
|
|
|
; CONFIG-NEXT: .long 45096
|
2015-03-09 23:48:09 +08:00
|
|
|
; TYPICAL-NEXT: .long 0
|
|
|
|
; TONGA-NEXT: .long 576
|
2015-03-17 22:34:42 +08:00
|
|
|
; CONFIG: .align 256
|
|
|
|
; CONFIG: test:
|
2013-04-27 02:32:24 +08:00
|
|
|
define void @test(i32 %p) #0 {
|
2013-04-16 01:51:21 +08:00
|
|
|
%i = add i32 %p, 2
|
|
|
|
%r = bitcast i32 %i to float
|
|
|
|
call void @llvm.SI.export(i32 15, i32 0, i32 1, i32 12, i32 0, float %r, float %r, float %r, float %r)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
|
2013-04-27 02:32:24 +08:00
|
|
|
|
|
|
|
attributes #0 = { "ShaderType"="0" } ; Pixel Shader
|