[llvm] [AMDGPU][MC] Allow op_sel in v_alignbit_b32 etc in GFX9 and GFX10 (PR #142188)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 06:39:12 PDT 2025
Sisyph wrote:
> > Does the bswap pattern at SIInstructions.td:3109 need an update to use the new pseudo?
>
> After some digging, I noticed that there is another pattern that matches bswap to V_PERM_B32 instead of V_ALIGNBIT_B32. This pattern actually takes precedence. So during instruction selection, for the 32 bit bswap, V_PERM_B32 is selected. The 64-bit bswap on the other hand is changed to two 32-it bswap during legalization. I added some run lines in one of the test files to confirm the selection of V_PERM_B32.
Can the unused pattern be deleted in a follow up commit?
https://github.com/llvm/llvm-project/pull/142188
More information about the llvm-commits
mailing list