This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] implement aarch64 neon vector load/store N-element structure class AdvSIMD (lselem)
ClosedPublic

Authored by hao.liu on Oct 9 2013, 9:21 AM.

Details

Reviewers
t.p.northover
Summary

Use 6 super registers: DPair/QPair/DTriple/QTriple/DQuad/QQuad to represent 2/3/4 consecutive registers.

Diff Detail

Event Timeline

Hi Hao,

These are starting to look really good. Quite a few points, but they're all very minor now, I think the overall approach is about as neat as you can get it.

One other thing (not tied to any particular diff line), there don't appear to be any LLVM IR CodeGen tests; you should add some of those.

Cheers.

Tim.

lib/Target/AArch64/AArch64ISelLowering.h
284–286

I think there's an LLVM_OVERRIDE macro that would let us mark this in case the prototype changes (in C++11 mode).

lib/Target/AArch64/AArch64InstrNEON.td
3029–3032

I think these should be defined in AArch64RegisterInfo.td

3041

You'll want to check this, but I think TableGen will be inferring "hasSideEffects" on these instructions without a pattern. If so you should add a "let hasSideEffects = 0" line.

lib/Target/AArch64/AArch64RegisterInfo.td
210–211

I like the improvement here, using rotl instead of extra defs. Well done.

lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
1986

This message could be improved. Custom Parsers are ugly, but the one benefit they do have is very good error reporting, so we should make use of it.

2009

Same comment about error message

2029–2041

A static array might improve this:

static unsigned SupRegIDs[][] = {{AArch64::QPairClassID, AArch64::DPairClassID}, ...};
SupRegID = SupRegIDs[Count-2][static_cast<int>(IsVec64)];

It's borderline though. Entirely up to you, just another option.

lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
364–373

Could most of these be 1-line forwards, passing the RegClassID as an extra parameter?

t.p.northover accepted this revision.Apr 3 2014, 4:50 AM
Eugene.Zelenko closed this revision.Oct 4 2016, 6:19 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Obsoleted by D1885.