[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-27 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-26 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-26 Thread Matt Arsenault via Phabricator via cfe-commits
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 \

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-25 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-25 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-25 Thread Matt Arsenault via Phabricator via cfe-commits
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:

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-25 Thread Yaxun Liu via Phabricator via cfe-commits
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