diff options
| author | Jeroen Ketema <j.ketema@imperial.ac.uk> | 2017-10-05 18:17:40 +0000 |
|---|---|---|
| committer | Jeroen Ketema <j.ketema@imperial.ac.uk> | 2017-10-05 18:17:40 +0000 |
| commit | 957151bd86a30e739bd20ffd9b7e8f0b4714c2c2 (patch) | |
| tree | 5af16064dabe5fb167c195924b8b69e67352b204 | |
| parent | ff829cea8b42db5a8328661ac4c0e60f9b233cb7 (diff) | |
| download | bcm5719-llvm-957151bd86a30e739bd20ffd9b7e8f0b4714c2c2.tar.gz bcm5719-llvm-957151bd86a30e739bd20ffd9b7e8f0b4714c2c2.zip | |
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
| -rw-r--r-- | libclc/ptx/lib/SOURCES_3.9 | 1 | ||||
| -rw-r--r-- | libclc/ptx/lib/SOURCES_4.0 | 1 | ||||
| -rw-r--r-- | libclc/ptx/lib/SOURCES_5.0 | 1 | ||||
| -rw-r--r-- | libclc/ptx/lib/shared/vload_half_helpers.ll | 23 |
4 files changed, 26 insertions, 0 deletions
diff --git a/libclc/ptx/lib/SOURCES_3.9 b/libclc/ptx/lib/SOURCES_3.9 index 58517988601..69c5e5ce9fb 100644 --- a/libclc/ptx/lib/SOURCES_3.9 +++ b/libclc/ptx/lib/SOURCES_3.9 @@ -1 +1,2 @@ +shared/vload_half_helpers.ll shared/vstore_half_helpers.ll diff --git a/libclc/ptx/lib/SOURCES_4.0 b/libclc/ptx/lib/SOURCES_4.0 index 58517988601..69c5e5ce9fb 100644 --- a/libclc/ptx/lib/SOURCES_4.0 +++ b/libclc/ptx/lib/SOURCES_4.0 @@ -1 +1,2 @@ +shared/vload_half_helpers.ll shared/vstore_half_helpers.ll diff --git a/libclc/ptx/lib/SOURCES_5.0 b/libclc/ptx/lib/SOURCES_5.0 index 58517988601..69c5e5ce9fb 100644 --- a/libclc/ptx/lib/SOURCES_5.0 +++ b/libclc/ptx/lib/SOURCES_5.0 @@ -1 +1,2 @@ +shared/vload_half_helpers.ll shared/vstore_half_helpers.ll diff --git a/libclc/ptx/lib/shared/vload_half_helpers.ll b/libclc/ptx/lib/shared/vload_half_helpers.ll new file mode 100644 index 00000000000..f79d104d547 --- /dev/null +++ b/libclc/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 +} |

