This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Allow vector store legalization into 128-bit-wide types
ClosedPublic

Authored by paquette on Jan 20 2021, 5:40 PM.

Details

Summary

We are allowed to store 128-bit-wide values using the q registers on AArch64.

GlobalISel was clamping the number of elements in vector stores into 64 bits instead.

This results in some poor codegen in cases like below:

https://godbolt.org/z/E56dq8

; SDAG uses a stp + q registers in both cases here.
define void @float(<16 x float> %val, <16 x float>* %ptr) {
    store <16 x float> %val, <16 x float>* %ptr
    ret void
}

define void @double(<8 x double> %val, <8 x double>* %ptr) {
    store <8 x double> %val, <8 x double>* %ptr
    ret void
}

This adds similar legalization for vector stores with s8 and s16 elements.

Diff Detail

Event Timeline

paquette created this revision.Jan 20 2021, 5:40 PM
paquette requested review of this revision.Jan 20 2021, 5:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2021, 5:40 PM
aemerson accepted this revision.Jan 22 2021, 10:59 AM

Oh dear, how did we miss that. LGTM.

This revision is now accepted and ready to land.Jan 22 2021, 10:59 AM