forked from OSchip/llvm-project
[AMDGPU] add __builtin_amdgcn_s_getpc
Summary: Added the builtin corresponding to the s_getpc intrinsic added in llvm D32862 Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye Differential Revision: https://reviews.llvm.org/D33276 llvm-svn: 303861
This commit is contained in:
parent
5150612012
commit
702fe45bcd
|
@ -36,6 +36,7 @@ BUILTIN(__builtin_amdgcn_workitem_id_z, "Ui", "nc")
|
|||
// Instruction builtins.
|
||||
//===----------------------------------------------------------------------===//
|
||||
BUILTIN(__builtin_amdgcn_s_getreg, "UiIi", "n")
|
||||
BUILTIN(__builtin_amdgcn_s_getpc, "LUi", "n")
|
||||
BUILTIN(__builtin_amdgcn_s_waitcnt, "vIi", "n")
|
||||
BUILTIN(__builtin_amdgcn_s_sendmsg, "vIiUi", "n")
|
||||
BUILTIN(__builtin_amdgcn_s_sendmsghalt, "vIiUi", "n")
|
||||
|
|
|
@ -481,6 +481,13 @@ void test_fmed3_f32(global float* out, float a, float b, float c)
|
|||
*out = __builtin_amdgcn_fmed3f(a, b, c);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @test_s_getpc
|
||||
// CHECK: call i64 @llvm.amdgcn.s.getpc()
|
||||
void test_s_getpc(global ulong* out)
|
||||
{
|
||||
*out = __builtin_amdgcn_s_getpc();
|
||||
}
|
||||
|
||||
// CHECK-DAG: [[WI_RANGE]] = !{i32 0, i32 1024}
|
||||
// CHECK-DAG: attributes #[[NOUNWIND_READONLY:[0-9]+]] = { nounwind readonly }
|
||||
// CHECK-DAG: attributes #[[READ_EXEC_ATTRS]] = { convergent }
|
||||
|
|
Loading…
Reference in New Issue