This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE2] Add the SVE2.1 FP quadword reduction instructions
ClosedPublic

Authored by david-arm on Nov 4 2022, 6:05 AM.

Details

Summary

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

faddqv : Floating-point add recursive reduction of quadword vector segments
fmaxqv : Floating-point maximum reduction of quadword vector segments
fmaxnmqv : Floating-point maximum number recursive reduction of quadword vector segments
fminqv : Floating-point minimum recursive reduction of quadword vector segments
fminnmqv : Floating-point minimum number recursive reduction of quadword vector segments

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

Diff Detail

Event Timeline

david-arm created this revision.Nov 4 2022, 6:05 AM
Herald added a project: Restricted Project. · View Herald Transcript
david-arm requested review of this revision.Nov 4 2022, 6:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2022, 6:05 AM
david-arm added inline comments.
llvm/lib/Target/AArch64/AArch64.td
646 ↗(On Diff #473209)

These changes were needed for the TSV110 scheduling model.

paulwalker-arm added inline comments.Nov 4 2022, 9:30 AM
llvm/lib/Target/AArch64/SVEInstrFormats.td
9289

As per my comment on D137411, can you use a similar class hierarchy as use by the normal reduction intrinsics?

Matt added a subscriber: Matt.Nov 5 2022, 8:34 PM
david-arm added inline comments.Nov 7 2022, 1:45 AM
llvm/lib/Target/AArch64/SVEInstrFormats.td
9289

I'm not sure what you mean to be honest, given these are not integer reductions and have completely different encoding groups to the integer variants. I can't see much reuse here for example:

SVE floating-point recursive reduction (quadwords): bits 31-24: 0b01100100, bits 21-19: 0b010
SVE bitwise logical reduction (quadwords): bits 31-24: 0b00000100, bits 21-19: 0b011

Is there something about the naming scheme instead that you wish to change?

paulwalker-arm accepted this revision.Nov 7 2022, 2:43 AM
paulwalker-arm added inline comments.
llvm/lib/Target/AArch64/SVEInstrFormats.td
9289

Sorry @david-arm , I got carried away with a comment that was only meant for the integer reductions.

This revision is now accepted and ready to land.Nov 7 2022, 2:43 AM