This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE2] Add the SVE2.1 extract-and-narrow instructions
ClosedPublic

Authored by david-arm on Oct 25 2022, 7:51 AM.

Details

Summary

This patch adds the assembly/disassembly for the following instructions:

sqcvtn : Signed saturating extract narrow and interleave
sqcvtun : Signed saturating unsigned extract narrow and interleave
uqcvtn : Unsigned saturating extract narrow and interleave

The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2022-09

Diff Detail

Event Timeline

david-arm created this revision.Oct 25 2022, 7:51 AM
david-arm requested review of this revision.Oct 25 2022, 7:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 7:51 AM
llvm/lib/Target/AArch64/SVEInstrFormats.td
8701

Do you mind exposing tsz8_64 at this level to match sve2_int_sat_extract_narrow...? I know we only need one size right now but structurally this will make it easier to update in the future. You can still have multiclass sve2p1_multi_vec_extract_narrow that uses this minimalist interface, again much like how sve2_int_sat_extract_narrow_bottom works. We'll need the multiclass anyway once we start enabling code generation.

llvm/test/MC/AArch64/SVE2p1/sqcvtn-diagnostics.s
8

Just an observation but it seems preferable to get the same nice error message as we do for the {z1.s-z2.s} case.

  • Expose tsz to the class
david-arm marked an inline comment as done.Oct 27 2022, 12:35 AM
david-arm added inline comments.
llvm/test/MC/AArch64/SVE2p1/sqcvtn-diagnostics.s
8

If I get chance I can try to take a look at this. I suspect it's probably due to non-matching suffixes for the single vector and vector list. We probably need to change how we deal with diagnostics for ZZ_s_mul_r operands.

paulwalker-arm accepted this revision.Oct 27 2022, 4:50 PM
This revision is now accepted and ready to land.Oct 27 2022, 4:50 PM