[libclc] 37/92: Add vload_half helpers for ptx

Andreas Boll aboll-guest at moszumanska.debian.org
Mon Nov 6 15:11:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

aboll-guest pushed a commit to branch master
in repository libclc.

commit 1440465d1f528a9549eab3d45d8bafef0c647b0b
Author: Jeroen Ketema <j.ketema at xs4all.nl>
Date:   Thu Oct 5 18:17:40 2017 +0000

    Add vload_half helpers for ptx
    
    The removes the vload_half unresolved calls from the nvptx libraries.
    
    Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@314998 91177308-0d34-0410-b5e6-96231b3b80d8
---
 ptx/lib/SOURCES_3.9                  |  1 +
 ptx/lib/SOURCES_4.0                  |  1 +
 ptx/lib/SOURCES_5.0                  |  1 +
 ptx/lib/shared/vload_half_helpers.ll | 23 +++++++++++++++++++++++
 4 files changed, 26 insertions(+)

diff --git a/ptx/lib/SOURCES_3.9 b/ptx/lib/SOURCES_3.9
index 5851798..69c5e5c 100644
--- a/ptx/lib/SOURCES_3.9
+++ b/ptx/lib/SOURCES_3.9
@@ -1 +1,2 @@
+shared/vload_half_helpers.ll
 shared/vstore_half_helpers.ll
diff --git a/ptx/lib/SOURCES_4.0 b/ptx/lib/SOURCES_4.0
index 5851798..69c5e5c 100644
--- a/ptx/lib/SOURCES_4.0
+++ b/ptx/lib/SOURCES_4.0
@@ -1 +1,2 @@
+shared/vload_half_helpers.ll
 shared/vstore_half_helpers.ll
diff --git a/ptx/lib/SOURCES_5.0 b/ptx/lib/SOURCES_5.0
index 5851798..69c5e5c 100644
--- a/ptx/lib/SOURCES_5.0
+++ b/ptx/lib/SOURCES_5.0
@@ -1 +1,2 @@
+shared/vload_half_helpers.ll
 shared/vstore_half_helpers.ll
diff --git a/ptx/lib/shared/vload_half_helpers.ll b/ptx/lib/shared/vload_half_helpers.ll
new file mode 100644
index 0000000..f79d104
--- /dev/null
+++ b/ptx/lib/shared/vload_half_helpers.ll
@@ -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
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list