This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE2] Add the SVE2.1 bfmlslb and bfmlslt instructions
ClosedPublic

Authored by david-arm on Oct 21 2022, 4:06 AM.

Details

Summary

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

BFMLSLB : BFloat16 floating-point multiply-subtract long

from single-precision (bottom)

BFMLSLT : BFloat16 floating-point multiply-subtract long

from single-precision (top)

Both the vector and indexed forms are added for each.

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

Diff Detail

Event Timeline

david-arm created this revision.Oct 21 2022, 4:06 AM
david-arm requested review of this revision.Oct 21 2022, 4:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2022, 4:06 AM
c-rhodes accepted this revision.Oct 21 2022, 5:34 AM
c-rhodes added a subscriber: c-rhodes.

Just one nit but otherwise LGTM

llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
2123

I know it's not introduced by your patch but this should be ZZZI as well, same for next instruction.

This revision is now accepted and ready to land.Oct 21 2022, 5:34 AM
david-arm updated this revision to Diff 469593.Oct 21 2022, 6:57 AM
  • As a result of changing the instruction name from BFMLALB_ZZI to BFMLALB_ZZZI I started to see failures building AArch64SchedNeoverse.td. I have no idea why this happens, but the solution is the same as elsewhere, i.e. to add SVEUnsupported.F to the list of unsupported features.
  • As a result of a comment on a previous patch in this chain I have moved the tests into llvm/test/MC/AArch64/SVE2p1 and removed the sme2_or_sve2p1 part from the names.
david-arm marked an inline comment as done.Oct 21 2022, 6:58 AM
sdesmalen accepted this revision.Oct 21 2022, 7:05 AM
c-rhodes added inline comments.Oct 21 2022, 7:20 AM
llvm/lib/Target/AArch64/AArch64SchedNeoverseN2.td
2051

I suspect the reason the scheduler model failed to compile is this regex no longer matches and the model is marked as complete? The regex should now be ^BFMLAL[BT]_ZZZI?$, although I don't really get how what you did fixed this.

david-arm updated this revision to Diff 469648.Oct 21 2022, 9:15 AM
  • Used @c-rhodes's suggestion about how to fix the neoverse sched file.
  • Added _S suffix to SVE2p1 instructions.
david-arm marked an inline comment as done.Oct 21 2022, 9:15 AM
david-arm added inline comments.
llvm/lib/Target/AArch64/AArch64SchedNeoverseN2.td
2051

Good shout! I've fixed the regex instead.

This revision was landed with ongoing or failed builds.Oct 25 2022, 1:51 AM
This revision was automatically updated to reflect the committed changes.
david-arm marked an inline comment as done.