[PATCH] D116241: [AMDGPU] Changing S_AND_B32 to V_AND_B32_e64 in the divergent 'trunc' to i1 pattern
Alexander via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 23 14:05:29 PST 2021
alex-t created this revision.
alex-t added a reviewer: rampitec.
Herald added subscribers: foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
alex-t requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
In 'trunc' i16/32/64 to i1 pattern the 'and $src, 1' node supply operand to 'setcc'.
The latter is selected to S_CMP_EQ/V_CMP_EQ dependent on the divergence. In case the 'and' is scalar
and 'setcc' is divergent, we need VGPR to SGPR copy to adjust input operand for V_CMP_EQ.
This patch changes the S_AND_B32 to V_AND_B32_e64 in the 'trunc to i1' divergent patterns.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116241
Files:
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/lib/Target/AMDGPU/VOPInstructions.td
llvm/test/CodeGen/AMDGPU/divergence-driven-trunc-to-i1.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116241.396088.patch
Type: text/x-patch
Size: 3926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211223/58f948f0/attachment.bin>
More information about the llvm-commits
mailing list