HomePhabricator

[AArch64] Remove an overly conservative check when generating store pairs.

Description

[AArch64] Remove an overly conservative check when generating store pairs.

Store instructions do not modify register values and therefore it's safe
to form a store pair even if the source register has been read in between
the two store instructions.

Previously, the read of w1 (see below) prevented the formation of a stp.

str      w0, [x2]
ldr     w8, [x2, #8]
add      w0, w8, w1
str     w1, [x2, #4]
ret

We now generate the following code.

stp      w0, w1, [x2]
ldr     w8, [x2, #8]
add      w0, w8, w1
ret

All correctness tests with -Ofast on A57 with Spec200x and EEMBC pass.
Performance results for SPEC2K were within noise.

Details

Committed
mcrosierJun 9 2015, 1:59 PM
Parents
rL239431: Use AlignOf traits to enable static_assert.
Branches
Unknown
Tags
Unknown