This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.
Closed by commit rG369e26ca9e0d: [AMDGPU] Add
__builtin_amdgcn_workgroup_size_x/y/z (authored by yaxunl).
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
yaxunl marked 2 inline comments as done.
yaxunl added inline comments.
Comment at: clang/test/CodeGenCUDA/amdgpu-workgroup-size.cu:2
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \
+// RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \
+// RUN: | FileCheck %s
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/test/CodeGenCUDA/amdgpu-workgroup-size.cu:2
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \
+// RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \
yaxunl added inline comments.
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13428
+return Call;
+ return CGF.Builder.CreateAddrSpaceCast(Call, RetTy);
+}
arsenm wrote:
> Why is this necessary? The builtin always has the same return type?
due to
yaxunl updated this revision to Diff 252621.
yaxunl marked 9 inline comments as done.
yaxunl added a comment.
Revised by Matt's comments
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76772/new/
https://reviews.llvm.org/D76772
Files:
clang/include/clang/Basic/BuiltinsAMDGPU.def
arsenm added inline comments.
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13428
+return Call;
+ return CGF.Builder.CreateAddrSpaceCast(Call, RetTy);
+}
Why is this necessary? The builtin always has the same return type?
Comment at:
yaxunl created this revision.
yaxunl added reviewers: arsenm, b-sumner, cfang.
Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, nhaehnle, wdng,
jvesely, kzhuravl.
The main purpose of introducing these builtins is to add a range metadata [1,
1025) on the work group size loaded from