[llvm] [AMDGPU][True16][CodeGen] true16 codegen for bswap (PR #122849)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 04:50:52 PST 2025
================
@@ -3039,6 +3041,19 @@ def : GCNPat <
(i32 (zext (bswap i16:$a))),
(V_PERM_B32_e64 (i32 0), VSrc_b32:$a, (S_MOV_B32 (i32 0x0c0c0001)))
>;
+}
+
+let True16Predicate = UseRealTrue16Insts in {
+def : GCNPat <
+ (i16 (bswap i16:$a)),
+ (EXTRACT_SUBREG (V_PERM_B32_e64 (i32 0), (COPY VGPR_16:$a), (S_MOV_B32 (i32 0x0c0c0001))), lo16)
+>;
+
+def : GCNPat <
+ (i32 (zext (bswap i16:$a))),
----------------
arsenm wrote:
should this handle zext or any ext
https://github.com/llvm/llvm-project/pull/122849
More information about the llvm-commits
mailing list