[PATCH] D100877: AMDGPU: Fix indirect tail calls

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 08:02:16 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/sibling-call.ll:282
+; GCN: s_setpc_b64 [[FUNC_PTR]]
+define hidden fastcc i32 @indirect_uniform_sibling_call_i32_fastcc_i32_i32(i32 %a, i32 %b, i32 %c) #1 {
+entry:
----------------
madhur13490 wrote:
> Sorry for late comments. Nit - %c is unused. Do you need attribute on the signature?
The attribute adds noinline in case we were ever using the force inline mode for some reason


================
Comment at: llvm/test/CodeGen/AMDGPU/sibling-call.ll:301
+  %add = add i32 %b, %c
+  %ret = tail call fastcc i32 %func.ptr(i32 %a, i32 %add)
+  ret i32 %ret
----------------
madhur13490 wrote:
> Just wondering, why is this a divergent call? Because the pointer is incoming as a parameter?
> 
Yes


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

https://reviews.llvm.org/D100877



More information about the llvm-commits mailing list