[PATCH] D19191: AMDGPU/SI: add llvm.amdgcn.ps.live intrinsic

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 16 11:00:07 PDT 2016


nhaehnle created this revision.
nhaehnle added reviewers: arsenm, tstellarAMD.
nhaehnle added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.

This intrinsic returns true if the current thread belongs to a live pixel
and false if it belongs to a pixel that we are executing only for derivative
computation. It will be used by Mesa to implement gl_HelperInvocation.

Note that for pixels that are killed during the shader, this implementation
also returns true, but it doesn't matter because those pixels are always
disabled in the EXEC mask.

This unearthed a corner case in the instruction verifier, which complained
about a v_cndmask 0, 1, exec, exec<imp-use> instruction. That's stupid but
correct code, so make the verifier accept it as such.

http://reviews.llvm.org/D19191

Files:
  include/llvm/CodeGen/MachineInstr.h
  include/llvm/IR/IntrinsicsAMDGPU.td
  lib/CodeGen/MachineCSE.cpp
  lib/CodeGen/MachineInstr.cpp
  lib/CodeGen/StackSlotColoring.cpp
  lib/CodeGen/TwoAddressInstructionPass.cpp
  lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIInstructions.td
  lib/Target/AMDGPU/SIWholeQuadMode.cpp
  lib/Target/ARM/ARMBaseInstrInfo.cpp
  lib/Target/SystemZ/SystemZElimCompare.cpp
  test/CodeGen/AMDGPU/llvm.amdgcn.ps.live.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19191.53991.patch
Type: text/x-patch
Size: 16272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160416/706bedc8/attachment.bin>


More information about the llvm-commits mailing list