[PATCH] D37887: AMDGPU: Run internalize symbols at -O0

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 16:41:03 PDT 2017


arsenm added inline comments.


================
Comment at: test/CodeGen/AMDGPU/internalize.ll:26
 
-; Function Attrs: alwaysinline nounwind
+; CHECK: define amdgpu_kernel void @foo_used(
 define amdgpu_kernel void @foo_used(i32 addrspace(1)* %out, i32 %tid) local_unnamed_addr #1 {
----------------
arsenm wrote:
> rampitec wrote:
> > rampitec wrote:
> > > I have check prefixes ALL, OPT and OPTNONE. The check prefix CHECK does not exist.
> > Does it work? Code now seems to be right, but this check shall fail. foo_used is always_inline, it shall be internalized, inlined and eliminated.
> This test is actually broken as is. The calling convention for amdgpu_kernel doesn't match the call site calling convention, so this gets turned into trap/unreachable which is why it gets eliminated.
We probably shouldn't allow calls to amdgpu_kernel for the IR calling convention. 


https://reviews.llvm.org/D37887





More information about the llvm-commits mailing list