xref: /llvm-project/libclc/amdgpu/lib/shared/vload_half_helpers.ll (revision 285d2fb85c89a42dca49ea66af425f4deba352c2)
1*285d2fb8SJan Veselydefine float @__clc_vload_half_float_helper__private(half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
2*285d2fb8SJan Vesely  %data = load half, half addrspace(0)* %ptr
3*285d2fb8SJan Vesely  %res = fpext half %data to float
4*285d2fb8SJan Vesely  ret float %res
5*285d2fb8SJan Vesely}
6*285d2fb8SJan Vesely
7*285d2fb8SJan Veselydefine float @__clc_vload_half_float_helper__global(half addrspace(1)* nocapture %ptr) nounwind alwaysinline {
8*285d2fb8SJan Vesely  %data = load half, half addrspace(1)* %ptr
9*285d2fb8SJan Vesely  %res = fpext half %data to float
10*285d2fb8SJan Vesely  ret float %res
11*285d2fb8SJan Vesely}
12*285d2fb8SJan Vesely
13*285d2fb8SJan Veselydefine float @__clc_vload_half_float_helper__local(half addrspace(3)* nocapture %ptr) nounwind alwaysinline {
14*285d2fb8SJan Vesely  %data = load half, half addrspace(3)* %ptr
15*285d2fb8SJan Vesely  %res = fpext half %data to float
16*285d2fb8SJan Vesely  ret float %res
17*285d2fb8SJan Vesely}
18*285d2fb8SJan Vesely
19*285d2fb8SJan Veselydefine float @__clc_vload_half_float_helper__constant(half addrspace(2)* nocapture %ptr) nounwind alwaysinline {
20*285d2fb8SJan Vesely  %data = load half, half addrspace(2)* %ptr
21*285d2fb8SJan Vesely  %res = fpext half %data to float
22*285d2fb8SJan Vesely  ret float %res
23*285d2fb8SJan Vesely}
24