[libclc] r279350 - amdgcn: Fix get_local_size IR return type
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 19 17:01:21 PDT 2016
Author: arsenm
Date: Fri Aug 19 19:01:21 2016
New Revision: 279350
URL: http://llvm.org/viewvc/llvm-project?rev=279350&view=rev
Log:
amdgcn: Fix get_local_size IR return type
Added:
libclc/trunk/amdgcn/lib/workitem/get_local_size.ll
libclc/trunk/r600/lib/workitem/get_local_size.ll
- copied, changed from r279343, libclc/trunk/amdgpu/lib/workitem/get_local_size.ll
Removed:
libclc/trunk/amdgpu/lib/workitem/get_local_size.ll
Modified:
libclc/trunk/amdgcn/lib/SOURCES
libclc/trunk/amdgpu/lib/SOURCES
libclc/trunk/r600/lib/SOURCES
Modified: libclc/trunk/amdgcn/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgcn/lib/SOURCES?rev=279350&r1=279349&r2=279350&view=diff
==============================================================================
--- libclc/trunk/amdgcn/lib/SOURCES (original)
+++ libclc/trunk/amdgcn/lib/SOURCES Fri Aug 19 19:01:21 2016
@@ -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
Added: libclc/trunk/amdgcn/lib/workitem/get_local_size.ll
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgcn/lib/workitem/get_local_size.ll?rev=279350&view=auto
==============================================================================
--- libclc/trunk/amdgcn/lib/workitem/get_local_size.ll (added)
+++ libclc/trunk/amdgcn/lib/workitem/get_local_size.ll Fri Aug 19 19:01:21 2016
@@ -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
+}
Modified: libclc/trunk/amdgpu/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgpu/lib/SOURCES?rev=279350&r1=279349&r2=279350&view=diff
==============================================================================
--- libclc/trunk/amdgpu/lib/SOURCES (original)
+++ libclc/trunk/amdgpu/lib/SOURCES Fri Aug 19 19:01:21 2016
@@ -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
Removed: libclc/trunk/amdgpu/lib/workitem/get_local_size.ll
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/amdgpu/lib/workitem/get_local_size.ll?rev=279349&view=auto
==============================================================================
--- libclc/trunk/amdgpu/lib/workitem/get_local_size.ll (original)
+++ libclc/trunk/amdgpu/lib/workitem/get_local_size.ll (removed)
@@ -1,18 +0,0 @@
-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 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
- ret i32 %x
-y_dim:
- %y = call i32 @llvm.r600.read.local.size.y() nounwind readnone
- ret i32 %y
-z_dim:
- %z = call i32 @llvm.r600.read.local.size.z() nounwind readnone
- ret i32 %z
-default:
- ret i32 0
-}
Modified: libclc/trunk/r600/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/r600/lib/SOURCES?rev=279350&r1=279349&r2=279350&view=diff
==============================================================================
--- libclc/trunk/r600/lib/SOURCES (original)
+++ libclc/trunk/r600/lib/SOURCES Fri Aug 19 19:01:21 2016
@@ -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
Copied: libclc/trunk/r600/lib/workitem/get_local_size.ll (from r279343, libclc/trunk/amdgpu/lib/workitem/get_local_size.ll)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/r600/lib/workitem/get_local_size.ll?p2=libclc/trunk/r600/lib/workitem/get_local_size.ll&p1=libclc/trunk/amdgpu/lib/workitem/get_local_size.ll&r1=279343&r2=279350&rev=279350&view=diff
==============================================================================
--- libclc/trunk/amdgpu/lib/workitem/get_local_size.ll (original)
+++ libclc/trunk/r600/lib/workitem/get_local_size.ll Fri Aug 19 19:01:21 2016
@@ -5,14 +5,14 @@ declare i32 @llvm.r600.read.local.size.z
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
}
More information about the cfe-commits
mailing list