HomePhabricator

[GlobalISel][AArch64] Teach GISel to handle shifts in load addressing modes

Authored by paquette on Jul 23 2019, 9:09 AM.

Description

[GlobalISel][AArch64] Teach GISel to handle shifts in load addressing modes

When we select the XRO variants of loads, we can pull in very specific shifts
(of the size of an element). E.g.

ldr x1, [x2, x3, lsl #3]

This teaches GISel to handle these when they're coming from shifts
specifically.

This adds a new addressing mode function, selectAddrModeShiftedExtendXReg
which recognizes this pattern.

This also packs this up with selectAddrModeRegisterOffset into
selectAddrModeXRO. This is intended to be equivalent to selectAddrModeXRO
in AArch64ISelDAGtoDAG.

Also update load-addressing-modes to show that all of the cases here work.

Differential Revision: https://reviews.llvm.org/D65119

llvm-svn: 366819