[PATCH] D42203: [AMDGPU] Scratch setup fix on AMDPAL gfx9+ merge shader

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 09:40:38 PST 2018


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


================
Comment at: test/CodeGen/AMDGPU/amdpal_scratch_mergeshader.ll:12
+
+define dllexport amdgpu_hs void @_amdgpu_hs_main(i32 inreg %arg, i32 inreg %arg1, i32 inreg %arg2, i32 inreg %arg3, i32 inreg %arg4, i32 inreg %arg5, i32 inreg %arg6, i32 inreg %arg7, <6 x i32> inreg %arg8, i32 %arg9, i32 %arg10, i32 %arg11, i32 %arg12, i32 %arg13, i32 %arg14) #4 {
+.entry:
----------------
arsenm wrote:
> You don't need the linkage. Most of these arguments also look unused.
> 
> Why is most of this function body necessary? Shouldn't you only need a single volatile scratch access?
Removed the linkage and arg9 onwards. arg0-arg8 are needed. I got that body by using bugpoint on a real shader; any further manual reduction results  in the scratch access disappearing. It needs to be an alloca to test what the fix is doing.


Repository:
  rL LLVM

https://reviews.llvm.org/D42203





More information about the llvm-commits mailing list