This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Asm: Add AsmOperand classes for SVE gather/scatter addressing modes.
ClosedPublic

Authored by sdesmalen on Apr 23 2018, 6:50 AM.

Details

Summary

This patch adds parsing support for 'vector + shift/extend' and
corresponding asm operand classes, needed for implementing SVE's
gather/scatter addressing modes.

The added combinations of vector (ZPR) and Shift/Extend are:

Unscaled:

ZPR64ExtLSL8:           signed 64-bit offsets  (z0.d)
ZPR32ExtUXTW8:        unsigned 32-bit offsets  (z0.s, uxtw)
ZPR32ExtSXTW8:          signed 32-bit offsets  (z0.s, sxtw)

Unpacked and unscaled:

ZPR64ExtUXTW8:        unsigned 32-bit offsets  (z0.d, uxtw)
ZPR64ExtSXTW8:          signed 32-bit offsets  (z0.d, sxtw)

Unpacked and scaled:

ZPR64ExtUXTW<scale>:  unsigned 32-bit offsets  (z0.d, uxtw #<shift>)
ZPR64ExtSXTW<scale>:    signed 32-bit offsets  (z0.d, sxtw #<shift>)

Scaled:

ZPR32ExtUXTW<scale>:  unsigned 32-bit offsets  (z0.s, uxtw #<shift>)
ZPR32ExtSXTW<scale>:    signed 32-bit offsets  (z0.s, sxtw #<shift>)
ZPR64ExtLSL<scale>:   unsigned 64-bit offsets  (z0.d,  lsl #<shift>)
ZPR64ExtLSL<scale>:     signed 64-bit offsets  (z0.d,  lsl #<shift>)

Patch [1/3] in series to add support for SVE's gather load instructions
that use scalar+vector addressing modes:

Diff Detail

Repository
rL LLVM

Event Timeline

sdesmalen created this revision.Apr 23 2018, 6:50 AM
sdesmalen edited the summary of this revision. (Show Details)Apr 23 2018, 6:55 AM
fhahn accepted this revision.Apr 23 2018, 8:40 AM

LGTM, extension related to SVE register parsing.

lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
861 ↗(On Diff #143537)

I think this won't compile unless D45879 is committed. I do not think we should block this patch series on D45879.

This revision is now accepted and ready to land.Apr 23 2018, 8:40 AM
sdesmalen added inline comments.Apr 23 2018, 8:53 AM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
861 ↗(On Diff #143537)

Hi Florian, well spotted. The DiagnosticPredicate should indeed not be used in this patch, I must have missed this!
I'll remove this change and update patch D45958 accordingly (this is patch [8/8], the negative tests).
When (or if) D45879 makes it in, I will post another patch that improves the diagnostics for all the negative tests added in D45958.

sdesmalen updated this revision to Diff 143636.Apr 23 2018, 2:02 PM
  • Removed any reference to DiagnosticPredicate, thus removing dependency on D45879 .
sdesmalen edited the summary of this revision. (Show Details)Apr 24 2018, 10:45 AM
This revision was automatically updated to reflect the committed changes.