This is an archive of the discontinued LLVM Phabricator instance.

Fix AArch64's Generating Ineffective Load/Store With Large Offset.
Needs ReviewPublic

Authored by linzj on Aug 18 2020, 8:29 PM.

Details

Summary

Add new combiner to split the address arithmetic into a new base and a
new offset, So that the offset fit into the load/store operation.
The split algorithm references the implementation from dart's
CanHold function in assembler_arm64.h
Note GCC has a mechanism to legitimize address: target
hook legitimize_address.

Diff Detail

Event Timeline

linzj created this revision.Aug 18 2020, 8:29 PM
linzj requested review of this revision.Aug 18 2020, 8:29 PM
linzj updated this revision to Diff 286480.Aug 18 2020, 11:00 PM

The "Address" operand supports more than one use.

Add LoadThenStore test case to test the situation above.

linzj updated this revision to Diff 286485.Aug 18 2020, 11:39 PM

Fix variable style && Only handle ISD:ADD for Address.

linzj updated this revision to Diff 286501.Aug 19 2020, 1:20 AM

Fix the unpassed tests.
Only split the constant when it would cause the one more move instruction.

linzj edited the summary of this revision. (Show Details)Aug 19 2020, 1:21 AM