Add vload_half helpers for ptx

The removes the vload_half unresolved calls from the nvptx libraries.

Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 314998
This commit is contained in:
Jeroen Ketema 2017-10-05 18:17:40 +00:00
parent ff829cea8b
commit 957151bd86
4 changed files with 26 additions and 0 deletions

View File

@ -1 +1,2 @@
shared/vload_half_helpers.ll
shared/vstore_half_helpers.ll

View File

@ -1 +1,2 @@
shared/vload_half_helpers.ll
shared/vstore_half_helpers.ll

View File

@ -1 +1,2 @@
shared/vload_half_helpers.ll
shared/vstore_half_helpers.ll

View File

@ -0,0 +1,23 @@
define float @__clc_vload_half_float_helper__private(half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
%data = load half, half addrspace(0)* %ptr
%res = fpext half %data to float
ret float %res
}
define float @__clc_vload_half_float_helper__global(half addrspace(1)* nocapture %ptr) nounwind alwaysinline {
%data = load half, half addrspace(1)* %ptr
%res = fpext half %data to float
ret float %res
}
define float @__clc_vload_half_float_helper__local(half addrspace(3)* nocapture %ptr) nounwind alwaysinline {
%data = load half, half addrspace(3)* %ptr
%res = fpext half %data to float
ret float %res
}
define float @__clc_vload_half_float_helper__constant(half addrspace(4)* nocapture %ptr) nounwind alwaysinline {
%data = load half, half addrspace(4)* %ptr
%res = fpext half %data to float
ret float %res
}