This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE2] Add the SVE2.1 tbxq instruction
ClosedPublic

Authored by david-arm on Nov 8 2022, 3:17 AM.

Details

Summary

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

tbxq : Programmable table lookup within each quadword vector segment (merging)

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

Diff Detail

Event Timeline

david-arm created this revision.Nov 8 2022, 3:17 AM
Herald added a project: Restricted Project. · View Herald Transcript
david-arm requested review of this revision.Nov 8 2022, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 3:17 AM
llvm/lib/Target/AArch64/SVEInstrFormats.td
9430

I don't know how much should we re-use the old classes.
but with some changes you could re-use class sve2_int_perm_tbx, no?
let Inst{15-13} = 0b001;
let Inst{12-10} = op

paulwalker-arm added inline comments.Nov 8 2022, 9:01 AM
llvm/lib/Target/AArch64/SVEInstrFormats.td
9430

I agree, and by reusing the sve2_int_perm_tbx multiclass we can also easily add the code generation support once the intrinsic exists.

david-arm updated this revision to Diff 474191.Nov 9 2022, 1:24 AM
  • Changed tbxq to reuse the existing sve2_int_perm_tbx class.
david-arm marked 2 inline comments as done.Nov 9 2022, 1:24 AM
paulwalker-arm added inline comments.Nov 9 2022, 2:43 AM
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3788

Is there a reason not to reuse the multiclass as well? You can pass in null_frag as the pattern and then once the intrinsic exists it'll be a one word change.

david-arm updated this revision to Diff 474242.Nov 9 2022, 5:54 AM
david-arm marked an inline comment as done.
paulwalker-arm accepted this revision.Nov 9 2022, 8:23 AM
This revision is now accepted and ready to land.Nov 9 2022, 8:23 AM
This revision was landed with ongoing or failed builds.Nov 10 2022, 1:06 AM
This revision was automatically updated to reflect the committed changes.