This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Select unscaled loads/stores in manual selector
Needs ReviewPublic

Authored by paquette on Sep 14 2020, 12:46 PM.

Details

Reviewers
aemerson
Summary

For smaller types (e.g. 16-bit), we don't import patterns for unscaled loads and stores.

Teach the selector to do this.

We didn't really have any testcases for the unscaled load/store stuff anyway, so add testcases showing what we can select.

(Nothing for STURBi or LDURBi, since we need more legalizer support for s8s to get those.)

This is a 0.2% code size improvement on 7zip at -O3. (Geomean -0.0%)

Diff Detail

Event Timeline

paquette created this revision.Sep 14 2020, 12:46 PM
paquette requested review of this revision.Sep 14 2020, 12:46 PM
paquette updated this revision to Diff 291660.Sep 14 2020, 1:08 PM

Remove assert because I forgot that there are a million different generic load instruction variants

aemerson added inline comments.Sep 15 2020, 1:56 PM
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
2358

selectUnscaledLoadStoreOp can take the bool IsStore for the first arg instead of a full opcode.

2367

When would this happen?