This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE2] Add the SVE2.1 while & pext predicate pair instructions
ClosedPublic

Authored by david-arm on Oct 26 2022, 5:09 AM.

Details

Summary

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

pext: Set pair of predicates from predicate-as-counter
whilelt: While incrementing signed scalar less than scalar
whilele: While incrementing signed scalar less than or equal to scalar
whilegt: While incrementing signed scalar greater than scalar
whilege: While incrementing signed scalar greater than or equal to scalar
whilelo: While incrementing unsigned scalar lower than scalar
whilels: While incrementing unsigned scalar lower or same as scalar
whilehs: While decrementing unsigned scalar higher or same as scalar
whilehi: While decrementing unsigned scalar higher than scalar

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

Diff Detail

Event Timeline

david-arm created this revision.Oct 26 2022, 5:09 AM
david-arm requested review of this revision.Oct 26 2022, 5:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2022, 5:09 AM
paulwalker-arm added inline comments.Oct 27 2022, 5:09 PM
llvm/lib/Target/AArch64/AArch64RegisterInfo.td
1000

SVEPredicateListMul

1009

Should this be PP_b_mul_r to match the style used by ZZ_b_mul_r?

david-arm updated this revision to Diff 471465.Oct 28 2022, 2:56 AM
  • Replaced SME with SVE in a few names and comments.
david-arm marked 2 inline comments as done.Oct 28 2022, 2:56 AM
Matt added a subscriber: Matt.Oct 29 2022, 8:20 AM
Matt removed a subscriber: Matt.
Matt added a subscriber: Matt.Oct 29 2022, 8:22 AM
paulwalker-arm added inline comments.Oct 30 2022, 7:00 AM
llvm/lib/Target/AArch64/AArch64RegisterInfo.td
970

It this required? I cannot see any strings for InvalidSVEPredicateList2x8 and thus I guess there's no tests for it? I see the equivalent ZPRVectorList doesn't set DiagnosticType so perhaps it's not needed.

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
1753

FYI: I guess it doesn't matter but you've added partial support for single register vector lists for predicates. I'm not saying there's anything wrong I'm just making you aware just incase we see weird errors later one.

llvm/lib/Target/AArch64/SVEInstrFormats.td
8830–8832

Rather than create a new base encoding class can you extend the existing one for PEXT (predicate) to match the encoding group for SVE extract mask predicate from predicate-as-counter and then inherit from that using the { 1, 0, ? } like syntax. You already have to pass in some of the operand types to account for the element type so that'll be no different.

9119

Please add a comment referencing the name of the encoding group. In this case SVE integer compare scalar count and limit (predicate pair).

llvm/test/MC/AArch64/SVE2p1/pext-diagnostics.s
6

Perhaps worth adding tests that try to use a one and four register vector list.

david-arm updated this revision to Diff 472340.Nov 1 2022, 9:51 AM
david-arm marked 4 inline comments as done.
paulwalker-arm accepted this revision.Nov 1 2022, 10:20 AM
This revision is now accepted and ready to land.Nov 1 2022, 10:20 AM
This revision was landed with ongoing or failed builds.Nov 2 2022, 1:39 AM
This revision was automatically updated to reflect the committed changes.