[Libclc-dev] [PATCH] Add vload_half helpers for ptx
Jeroen Ketema via Libclc-dev
libclc-dev at lists.llvm.org
Wed Oct 4 13:07:50 PDT 2017
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
+}
More information about the Libclc-dev
mailing list