[PATCH] D77390: Fix __builtin_amdgcn_workgroup_size_x/y/z return type

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 11 19:12:59 PDT 2020


yaxunl marked 2 inline comments as done.
yaxunl added inline comments.


================
Comment at: clang/test/CodeGenOpenCL/builtins-amdgcn.cl:541
 	switch (d) {
-	case 0: *out = __builtin_amdgcn_workgroup_size_x(); break;
+	case 0: *out = __builtin_amdgcn_workgroup_size_x() + 1; break;
 	case 1: *out = __builtin_amdgcn_workgroup_size_y(); break;
----------------
JonChesterfield wrote:
> This looks unrelated to the return type change
Without that change, the builtin return type is wrong and clang does not insert conversion for this "add" operation and causes assertion. Therefore this small change makes sure that error will not happen again.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77390/new/

https://reviews.llvm.org/D77390





More information about the cfe-commits mailing list