[PATCH] D53930: [AMDGPU] Fix the new atomic optimizer in pixel shaders.
Neil Henning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 31 06:46:27 PDT 2018
sheredom created this revision.
sheredom added reviewers: nhaehnle, arsenm.
sheredom added a project: AMDGPU.
Herald added subscribers: llvm-commits, jfb, t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.
The new atomic optimizer I previously added in https://reviews.llvm.org/D51969 did not work correctly when a pixel shader was using derivatives, and had helper lanes active.
To fix this we add an llvm.amdgcn.ps.live call that guards a branch around the entire atomic operation - ensuring that all helper lanes are inactive within the wavefront when we compute our atomic results.
I've added a test case that can cause derivatives, and exposes the problem.
Repository:
rL LLVM
https://reviews.llvm.org/D53930
Files:
lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53930.171909.patch
Type: text/x-patch
Size: 6078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181031/1cf2bad0/attachment.bin>
More information about the llvm-commits
mailing list