From b85d3a9c7e496f872b167d5405f052a3f682925b Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Sun, 26 Feb 2017 07:34:19 -0500 Subject: [PATCH] amdgcn: size_t is i32 in mesa3d Signed-off-by: Jan Vesely --- amdgcn/lib/workitem/get_global_size.ll | 13 +++++-------- amdgcn/lib/workitem/get_local_size.ll | 13 +++++-------- amdgcn/lib/workitem/get_num_groups.ll | 13 +++++-------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/amdgcn/lib/workitem/get_global_size.ll b/amdgcn/lib/workitem/get_global_size.ll index a516255..d51def3 100644 --- a/amdgcn/lib/workitem/get_global_size.ll +++ b/amdgcn/lib/workitem/get_global_size.ll @@ -2,20 +2,17 @@ declare i32 @llvm.r600.read.global.size.x() nounwind readnone declare i32 @llvm.r600.read.global.size.y() nounwind readnone declare i32 @llvm.r600.read.global.size.z() nounwind readnone -define i64 @get_global_size(i32 %dim) nounwind readnone alwaysinline { +define i32 @get_global_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.global.size.x() - %x.ext = zext i32 %x to i64 - ret i64 %x.ext + ret i32 %x y_dim: %y = call i32 @llvm.r600.read.global.size.y() - %y.ext = zext i32 %y to i64 - ret i64 %y.ext + ret i32 %y z_dim: %z = call i32 @llvm.r600.read.global.size.z() - %z.ext = zext i32 %z to i64 - ret i64 %z.ext + ret i32 %z default: - ret i64 1 + ret i32 1 } diff --git a/amdgcn/lib/workitem/get_local_size.ll b/amdgcn/lib/workitem/get_local_size.ll index a943375..92c6d26 100644 --- a/amdgcn/lib/workitem/get_local_size.ll +++ b/amdgcn/lib/workitem/get_local_size.ll @@ -2,20 +2,17 @@ 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 { +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() - %x.ext = zext i32 %x to i64 - ret i64 %x.ext + ret i32 %x y_dim: %y = call i32 @llvm.r600.read.local.size.y() - %y.ext = zext i32 %y to i64 - ret i64 %y.ext + ret i32 %y z_dim: %z = call i32 @llvm.r600.read.local.size.z() - %z.ext = zext i32 %z to i64 - ret i64 %z.ext + ret i32 %z default: - ret i64 1 + ret i32 1 } diff --git a/amdgcn/lib/workitem/get_num_groups.ll b/amdgcn/lib/workitem/get_num_groups.ll index 5b4b1cc..fd5c17c 100644 --- a/amdgcn/lib/workitem/get_num_groups.ll +++ b/amdgcn/lib/workitem/get_num_groups.ll @@ -2,20 +2,17 @@ declare i32 @llvm.r600.read.ngroups.x() nounwind readnone declare i32 @llvm.r600.read.ngroups.y() nounwind readnone declare i32 @llvm.r600.read.ngroups.z() nounwind readnone -define i64 @get_num_groups(i32 %dim) nounwind readnone alwaysinline { +define i32 @get_num_groups(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.ngroups.x() - %x.ext = zext i32 %x to i64 - ret i64 %x.ext + ret i32 %x y_dim: %y = call i32 @llvm.r600.read.ngroups.y() - %y.ext = zext i32 %y to i64 - ret i64 %y.ext + ret i32 %y z_dim: %z = call i32 @llvm.r600.read.ngroups.z() - %z.ext = zext i32 %z to i64 - ret i64 %z.ext + ret i32 %z default: - ret i64 1 + ret i32 1 } -- 2.10.2