[libclc] 45/58: amdgcn: Fix get_local_size IR return type
Andreas Boll
aboll-guest at moszumanska.debian.org
Thu Oct 6 08:16:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
aboll-guest pushed a commit to branch master
in repository libclc.
commit f5b81cfc499b034ab79cdfe2bf4596438635203f
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Sat Aug 20 00:01:21 2016 +0000
amdgcn: Fix get_local_size IR return type
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@279350 91177308-0d34-0410-b5e6-96231b3b80d8
---
amdgcn/lib/SOURCES | 1 +
amdgcn/lib/workitem/get_local_size.ll | 21 +++++++++++++++++++++
amdgpu/lib/SOURCES | 1 -
r600/lib/SOURCES | 1 +
{amdgpu => r600}/lib/workitem/get_local_size.ll | 8 ++++----
5 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/amdgcn/lib/SOURCES b/amdgcn/lib/SOURCES
index ca88b93..06ed228 100644
--- a/amdgcn/lib/SOURCES
+++ b/amdgcn/lib/SOURCES
@@ -3,4 +3,5 @@ synchronization/barrier_impl.ll
workitem/get_global_offset.cl
workitem/get_group_id.cl
workitem/get_local_id.cl
+workitem/get_local_size.ll
workitem/get_work_dim.cl
diff --git a/amdgcn/lib/workitem/get_local_size.ll b/amdgcn/lib/workitem/get_local_size.ll
new file mode 100644
index 0000000..59dd913
--- /dev/null
+++ b/amdgcn/lib/workitem/get_local_size.ll
@@ -0,0 +1,21 @@
+declare i32 @llvm.r600.read.local.size.x() nounwind readnone
+declare i32 @llvm.r600.read.local.size.y() nounwind readnone
+declare i32 @llvm.r600.read.local.size.z() nounwind readnone
+
+define i64 @get_local_size(i32 %dim) nounwind readnone alwaysinline {
+ switch i32 %dim, label %default [i32 0, label %x_dim i32 1, label %y_dim i32 2, label %z_dim]
+x_dim:
+ %x = call i32 @llvm.r600.read.local.size.x()
+ %x.ext = zext i32 %x to i64
+ ret i64 %x.ext
+y_dim:
+ %y = call i32 @llvm.r600.read.local.size.y()
+ %y.ext = zext i32 %y to i64
+ ret i64 %y.ext
+z_dim:
+ %z = call i32 @llvm.r600.read.local.size.z()
+ %z.ext = zext i32 %z to i64
+ ret i64 %z.ext
+default:
+ unreachable
+}
diff --git a/amdgpu/lib/SOURCES b/amdgpu/lib/SOURCES
index 403e1e7..efee251 100644
--- a/amdgpu/lib/SOURCES
+++ b/amdgpu/lib/SOURCES
@@ -17,5 +17,4 @@ image/write_imagei.cl
image/write_imageui.cl
image/write_image_impl.ll
workitem/get_num_groups.ll
-workitem/get_local_size.ll
workitem/get_global_size.ll
diff --git a/r600/lib/SOURCES b/r600/lib/SOURCES
index 33038f2..23da502 100644
--- a/r600/lib/SOURCES
+++ b/r600/lib/SOURCES
@@ -2,4 +2,5 @@ synchronization/barrier_impl.ll
workitem/get_global_offset.cl
workitem/get_group_id.cl
workitem/get_local_id.cl
+workitem/get_local_size.ll
workitem/get_work_dim.cl
diff --git a/amdgpu/lib/workitem/get_local_size.ll b/r600/lib/workitem/get_local_size.ll
similarity index 67%
rename from amdgpu/lib/workitem/get_local_size.ll
rename to r600/lib/workitem/get_local_size.ll
index 0a98de6..136c9c6 100644
--- a/amdgpu/lib/workitem/get_local_size.ll
+++ b/r600/lib/workitem/get_local_size.ll
@@ -5,14 +5,14 @@ declare i32 @llvm.r600.read.local.size.z() nounwind readnone
define i32 @get_local_size(i32 %dim) nounwind readnone alwaysinline {
switch i32 %dim, label %default [i32 0, label %x_dim i32 1, label %y_dim i32 2, label %z_dim]
x_dim:
- %x = call i32 @llvm.r600.read.local.size.x() nounwind readnone
+ %x = call i32 @llvm.r600.read.local.size.x()
ret i32 %x
y_dim:
- %y = call i32 @llvm.r600.read.local.size.y() nounwind readnone
+ %y = call i32 @llvm.r600.read.local.size.y()
ret i32 %y
z_dim:
- %z = call i32 @llvm.r600.read.local.size.z() nounwind readnone
+ %z = call i32 @llvm.r600.read.local.size.z()
ret i32 %z
default:
- ret i32 0
+ unreachable
}
--
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