[PATCH] Add vload_half helpers for ptx

Index: ptx/lib/SOURCES_3.9

Index: ptx/lib/SOURCES_3.9

--- ptx/lib/SOURCES_3.9 (revision 314925)
+++ ptx/lib/SOURCES_3.9 (working copy)
@@ -1 +1,2 @@
+shared/vload_half_helpers.ll
shared/vstore_half_helpers.ll
Index: ptx/lib/SOURCES_4.0

--- ptx/lib/SOURCES_4.0 (revision 314925)
+++ ptx/lib/SOURCES_4.0 (working copy)
@@ -1 +1,2 @@
+shared/vload_half_helpers.ll
shared/vstore_half_helpers.ll
Index: ptx/lib/SOURCES_5.0

--- ptx/lib/SOURCES_5.0 (revision 314925)
+++ ptx/lib/SOURCES_5.0 (working copy)
@@ -1 +1,2 @@
+shared/vload_half_helpers.ll
shared/vstore_half_helpers.ll
Index: ptx/lib/shared/vload_half_helpers.ll

--- ptx/lib/shared/vload_half_helpers.ll (nonexistent)
+++ ptx/lib/shared/vload_half_helpers.ll (working copy)
@@ -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
+}

removes the vload_half unresolved calls from nvptx libraries
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>

Jan

PS: the posted configure script patch is needed to actually build these
files