[PATCH] D116270: [AMDGPU] Enable divergence-driven XNOR selection

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 03:10:40 PST 2022


alex-t added a comment.

In D116270#3226983 <https://reviews.llvm.org/D116270#3226983>, @foad wrote:

>> SIInstrInfo::lowerScalarXnor() is dead after your patch
>
> I don't understand why it is dead. In general moveToVALU moves instructions to VALU if any of their inputs are VGPRs, which can happen even if the result is uniform -- e.g. if some of the inputs are derived from a floating point calculation which had to use VALU instructions.

What moveToVALU does is convert to VALU everything to the end, corresponding to the data dependency graph.
This is generally not what we want. At first, any VGPR to SGPR copy with a uniform VGPR source is going to be V_READFIRSTLANE_B32.
Nevertheless, in some cases (and there are plenty of) it is profitable to convert the whole data chain to VALU. The decision should be made depending on the context analysis results.
In case it is considered profitable we still need to be able to convert the whole variety of operations from SALU to VALU.
That is why no moveToVALU potential callees are deleted so far.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116270/new/

https://reviews.llvm.org/D116270



More information about the llvm-commits mailing list