[PATCH] D103263: [AArch64] Add S/UQXTRN tablegen patterns.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 00:45:26 PDT 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:4233
+def : Pat<(v8i8 (trunc (umin (v8i16 V128:$Vn),
+                             (v8i16 (AArch64NvCast (v2i64 (AArch64movi_edit (i32 85)))))))),
+          (UQXTNv8i8 V128:$Vn)>;
----------------
sdesmalen wrote:
> From the comment, I deduce that `(v8i16 (AArch64NvCast (v2i64 (AArch64movi_edit (i32 85))))) <=> v8i16 splat(255)`. Is there a reason this is not using AArch64dup?
> If so, can we use a more generic pattern fragment to see if something is a dup of <value>? That may cover more cases and would also make the pattern more readable.
It will lower any constant that it can into a AArch64ISD::MOVIedit/AArch64ISD::MOVIshift/etc. These become the various flavours of MOVI instructions. They are no longer dup's at this stage, if they ever were.

I have created PatFrags names for the constants used here. hopefully that makes it easier to read.


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

https://reviews.llvm.org/D103263



More information about the llvm-commits mailing list