2015-02-04 01:37:52 +08:00
|
|
|
;RUN: llc < %s -march=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI --check-prefix=BOTH %s
|
|
|
|
;RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck --check-prefix=VI --check-prefix=BOTH %s
|
|
|
|
|
|
|
|
; BOTH-LABEL: {{^}}main:
|
|
|
|
; BOTH: s_mov_b32 m0, s0
|
|
|
|
; VI-NEXT: s_nop 0
|
2016-05-07 01:48:48 +08:00
|
|
|
; BOTH-NEXT: sendmsg(MSG_GS_DONE, GS_OP_NOP)
|
2015-02-04 01:37:52 +08:00
|
|
|
; BOTH-NEXT: s_endpgm
|
|
|
|
|
2016-04-07 03:40:20 +08:00
|
|
|
define amdgpu_gs void @main(i32 inreg %a) #0 {
|
2015-02-04 01:37:52 +08:00
|
|
|
main_body:
|
|
|
|
call void @llvm.SI.sendmsg(i32 3, i32 %a)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
declare void @llvm.SI.sendmsg(i32, i32) #1
|
|
|
|
|
2016-04-07 03:40:20 +08:00
|
|
|
attributes #0 = { "unsafe-fp-math"="true" }
|
2015-02-04 01:37:52 +08:00
|
|
|
attributes #1 = { nounwind }
|