2017-01-25 06:02:15 +08:00
|
|
|
; RUN: llc < %s -march=amdgcn -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
|
|
|
; RUN: llc < %s -march=amdgcn -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TYPICAL %s
|
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs -o - | FileCheck --check-prefix=CONFIG --check-prefix=TONGA %s
|
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=carrizo -mattr=-flat-for-global -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
|
|
|
; RUN: llc < %s -march=amdgcn -mcpu=carrizo -mattr=-flat-for-global -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
|
2017-01-25 06:02:15 +08:00
|
|
|
; RUN: llc < %s -mtriple=amdgcn-pc-mingw -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
|
2015-03-19 06:19:16 +08:00
|
|
|
|
2017-10-05 06:44:13 +08:00
|
|
|
; ELF: Format: ELF64-amdgpu
|
|
|
|
; ELF: OS/ABI: SystemV (0x0)
|
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
|
2016-08-06 05:23:29 +08:00
|
|
|
; TONGA-NEXT: .long 704
|
2016-01-26 08:03:25 +08:00
|
|
|
; CONFIG: .p2align 8
|
2015-03-17 22:34:42 +08:00
|
|
|
; CONFIG: test:
|
2017-02-22 08:02:21 +08:00
|
|
|
define amdgpu_ps void @test(i32 %p) #0 {
|
2013-04-16 01:51:21 +08:00
|
|
|
%i = add i32 %p, 2
|
|
|
|
%r = bitcast i32 %i to float
|
2017-02-22 08:02:21 +08:00
|
|
|
call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r, float %r, float %r, float %r, i1 true, i1 false)
|
2013-04-16 01:51:21 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2017-02-22 08:02:21 +08:00
|
|
|
declare void @llvm.amdgcn.exp.f32(i32, i32, float, float, float, float, i1, i1) #0
|
|
|
|
|
|
|
|
attributes #0 = { nounwind }
|