[PATCH] D108633: [AArch64] Generate smov in place of sext(fmov(...))
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 25 05:28:45 PDT 2021
paulwalker-arm accepted this revision.
paulwalker-arm added a comment.
This revision is now accepted and ready to land.
The out-of-range tests show that with a few more patterns we can do better, but given they're not the common case I guess they can wait.
================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:2496-2507
+ def : Pat<(sext_inreg (vector_extract (nxv16i8 ZPR:$vec), VectorIndexB:$index), i8),
+ (i32 (SMOVvi8to32 (v16i8 (EXTRACT_SUBREG ZPR:$vec, zsub)), VectorIndexB:$index))>;
+ def : Pat<(sext_inreg (anyext (vector_extract (nxv16i8 ZPR:$vec), VectorIndexB:$index)), i8),
+ (i64 (SMOVvi8to64 (v16i8 (EXTRACT_SUBREG ZPR:$vec, zsub)), VectorIndexB:$index))>;
+
+ def : Pat<(sext_inreg (vector_extract (nxv8i16 ZPR:$vec), VectorIndexH:$index), i16),
+ (i32 (SMOVvi16to32 (v8i16 (EXTRACT_SUBREG ZPR:$vec, zsub)), VectorIndexH:$index))>;
----------------
Can you move these patterns up a couple of blocks to be just after the `UMOV` variants as that's the block they relate to.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108633/new/
https://reviews.llvm.org/D108633
More information about the llvm-commits
mailing list