25 lines · plain
1; XFAIL: *2; REQUIRES: asserts3; RUN: llc -mtriple=amdgcn -mcpu=bonaire < %s4 5; write_register doesn't prevent us from illegally trying to write a6; vgpr value into a scalar register, but I don't think there's much we7; can do to avoid this.8 9declare void @llvm.write_register.i32(metadata, i32) #010declare i32 @llvm.amdgcn.workitem.id.x() #011declare void @llvm.amdgcn.wave.barrier() #212 13define amdgpu_kernel void @write_vgpr_into_sgpr() {14 %tid = call i32 @llvm.amdgcn.workitem.id.x()15 call void @llvm.write_register.i32(metadata !0, i32 %tid)16 call void @llvm.amdgcn.wave.barrier() #217 ret void18}19 20attributes #0 = { nounwind readnone }21attributes #1 = { nounwind }22attributes #2 = { convergent nounwind }23 24!0 = !{!"exec_lo"}25