This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Use reg+reg addressing mode for immediate offsets.
ClosedPublic

Authored by paulwalker-arm on Jul 24 2021, 5:29 AM.

Details

Summary

For reg+imm SVE addressing mode imm is implictly scaled by VL,
making them impractical for truely immediate offsets. However, if
the offset can be unscaled based on the storage element type we
can use the reg+reg SVE addressing mode and thus either reduce the
number of generate add instructions or replace them with a mov
instruction that can be hoisted from the hot code path.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Jul 24 2021, 5:29 AM
paulwalker-arm requested review of this revision.Jul 24 2021, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2021, 5:29 AM
sdesmalen accepted this revision.Jul 24 2021, 8:15 AM
sdesmalen added a subscriber: sdesmalen.

That's a welcome improvement!

llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
5041

nit: seems a bit of an odd comment, how about:

// To use the reg+reg addressing mode, the immediate must be scaled by the element size.
This revision is now accepted and ready to land.Jul 24 2021, 8:15 AM
Matt added a subscriber: Matt.Jul 25 2021, 1:05 PM
This revision was landed with ongoing or failed builds.Jul 26 2021, 8:26 AM
This revision was automatically updated to reflect the committed changes.