summaryrefslogtreecommitdiffstats
path: root/libclc/ptx/lib/shared
diff options
context:
space:
mode:
authorJeroen Ketema <j.ketema@imperial.ac.uk>2017-10-04 19:07:48 +0000
committerJeroen Ketema <j.ketema@imperial.ac.uk>2017-10-04 19:07:48 +0000
commitfeefb0870f7995a2654fd3925104fb42166e39f1 (patch)
tree7b7822e996c07d1ffca28dd9637a91e3c871d3c2 /libclc/ptx/lib/shared
parent61b9ce217a044798629739cbcb69c253d1e923a0 (diff)
downloadbcm5719-llvm-feefb0870f7995a2654fd3925104fb42166e39f1.tar.gz
bcm5719-llvm-feefb0870f7995a2654fd3925104fb42166e39f1.zip
Add vstore_half helpers for ptx
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 314925
Diffstat (limited to 'libclc/ptx/lib/shared')
-rw-r--r--libclc/ptx/lib/shared/vstore_half_helpers.ll35
1 files changed, 35 insertions, 0 deletions
diff --git a/libclc/ptx/lib/shared/vstore_half_helpers.ll b/libclc/ptx/lib/shared/vstore_half_helpers.ll
new file mode 100644
index 00000000000..e958664e560
--- /dev/null
+++ b/libclc/ptx/lib/shared/vstore_half_helpers.ll
@@ -0,0 +1,35 @@
+define void @__clc_vstore_half_float_helper__private(float %data, half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
+ %res = fptrunc float %data to half
+ store half %res, half addrspace(0)* %ptr
+ ret void
+}
+
+define void @__clc_vstore_half_float_helper__global(float %data, half addrspace(1)* nocapture %ptr) nounwind alwaysinline {
+ %res = fptrunc float %data to half
+ store half %res, half addrspace(1)* %ptr
+ ret void
+}
+
+define void @__clc_vstore_half_float_helper__local(float %data, half addrspace(3)* nocapture %ptr) nounwind alwaysinline {
+ %res = fptrunc float %data to half
+ store half %res, half addrspace(3)* %ptr
+ ret void
+}
+
+define void @__clc_vstore_half_double_helper__private(double %data, half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
+ %res = fptrunc double %data to half
+ store half %res, half addrspace(0)* %ptr
+ ret void
+}
+
+define void @__clc_vstore_half_double_helper__global(double %data, half addrspace(1)* nocapture %ptr) nounwind alwaysinline {
+ %res = fptrunc double %data to half
+ store half %res, half addrspace(1)* %ptr
+ ret void
+}
+
+define void @__clc_vstore_half_double_helper__local(double %data, half addrspace(3)* nocapture %ptr) nounwind alwaysinline {
+ %res = fptrunc double %data to half
+ store half %res, half addrspace(3)* %ptr
+ ret void
+}
OpenPOWER on IntegriCloud