1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/CodeGen/AMDGPU/write-register-vgpr-into-sgpr.ll
2016-02-11 06:02:01 +00:00

23 lines
611 B
LLVM

; XFAIL: *
; REQUIRES: asserts
; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s
; write_register doesn't prevent us from illegally trying to write a
; vgpr value into a scalar register, but I don't think there's much we
; can do to avoid this.
declare void @llvm.write_register.i32(metadata, i32) #0
declare i32 @llvm.amdgcn.workitem.id.x() #0
define void @write_vgpr_into_sgpr() {
%tid = call i32 @llvm.amdgcn.workitem.id.x()
call void @llvm.write_register.i32(metadata !0, i32 %tid)
ret void
}
attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }
!0 = !{!"exec_lo"}