[PATCH] D57748: AMDGPU: Add inverse ballot intrinsic
Connor Abbott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 05:57:18 PST 2019
cwabbott created this revision.
cwabbott added reviewers: arsenm, nhaehnle.
Herald added subscribers: llvm-commits, t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.
This takes a uniform 64-bit bitmask, and returns a boolean value which
is true for each thread if the corresponding bit is 1. The
implementation of subgroupInverseBallot() in radv (and AMDVLK presumably) is
currently implements this by shifting by the thread-id, but this is a
complicated way of doing what's basically just a no-op thanks to how booleans
are stored in SGPR's.
Although the user guarantees that the value is uniform, it may still
wind up in VGPR's thanks to deficiencies in the backend, in which case
we have to emit two readfirstlane's.
Repository:
rL LLVM
https://reviews.llvm.org/D57748
Files:
include/llvm/IR/IntrinsicsAMDGPU.td
lib/Target/AMDGPU/AMDGPUSearchableTables.td
lib/Target/AMDGPU/SIFixSGPRCopies.cpp
lib/Target/AMDGPU/SIInstrInfo.cpp
lib/Target/AMDGPU/SIInstructions.td
test/CodeGen/AMDGPU/llvm.amdgcn.inverse.ballot.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57748.185290.patch
Type: text/x-patch
Size: 4426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190205/0bcaee17/attachment.bin>
More information about the llvm-commits
mailing list