This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add MVE interleaving load/store family.
ClosedPublic

Authored by simon_tatham on Jun 21 2019, 7:28 AM.

Details

Summary

This adds the family of loads and stores with names like VLD20.8 and
VST42.32, which load and store parts of multiple q-registers in such a
way that executing both VLD20 and VLD21, or all four of VLD40..VLD43,
will distribute 2 or 4 vectors' worth of memory data across the lanes
of the same number of registers but in a transposed order.

In addition to the Tablegen descriptions of the instructions
themselves, this patch also adds encode and decode support for the
QQPR and QQQQPR register classes (representing the range of loaded or
stored vector registers), and tweaks to the parsing system for lists
of vector registers to make it return the right format in this case
(since, unlike NEON, MVE regards q-registers as primitive, and not
just an alias for two d-registers).

Event Timeline

simon_tatham created this revision.Jun 21 2019, 7:28 AM
ostannard added inline comments.
llvm/lib/Target/ARM/ARMInstrMVE.td
130

Could we add a DiagnostigString to these? Something like "operand must be a list of two consecutive q registers in range [q0, q7]".

llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
1243

Is this new reg class needed? rGPR should already reject r13 and r15 for v8.1M.

llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp
1427

Could we use ARM::qsub_<N> instead of ARM::dsub_<N> to get the Q registers?

simon_tatham marked 4 inline comments as done.Jun 21 2019, 8:59 AM
simon_tatham added inline comments.
llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
1243

Apparently you're right – which means that the defn of that register class in ARMRegisterInfo.td has already been added in error. I'll remove it again.

An understandable error, though, I think: looking at the decoder method for rGPR, it only rejects SP without the feature HasV8Ops, and it always takes me a moment to remember that that feature name actually refers to v8-A only, not v8-M!

llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp
1427

Apparently so, it turns out, which simplifies these functions. Also I've taken the opportunity to combine them into a template.

simon_tatham marked an inline comment as done.

Addressed all review comments.

This revision is now accepted and ready to land.Jun 24 2019, 2:19 AM
miyuki added a subscriber: miyuki.Jun 24 2019, 6:55 AM
simon_tatham closed this revision.Jun 24 2019, 9:10 AM

I committed this this morning as rL364172, but accidentally left off the Phabricator footer (sorry). Now closing.