This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Check FeatureAddrLSLFast to fold base address with scale
AbandonedPublic

Authored by Allen on Sep 1 2023, 6:20 AM.

Details

Summary

We Split LSLFast into Addr and ALU parts on D157982, then
add the related subtarget features FeatureAddrLSLFast to
check the contant foldable in the shift of the addressing mode.

FeatureAddrLSLFast: Shifts of 1, 2 and 3 (Scales of 2, 4 and 8) are cheap.

Diff Detail

Event Timeline

Allen created this revision.Sep 1 2023, 6:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2023, 6:20 AM
Allen requested review of this revision.Sep 1 2023, 6:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2023, 6:20 AM

Can you give more details about what this helps with? We could probably argue both ways about whether these extends are free or not. Thanks

Allen added a comment.Sep 4 2023, 4:41 AM

hi @dmgreen, thanks for your attention.
I didn't find that the offset of a memory access instructions can be scaled 16 times, while this attempts to align with the comment for FeatureAddrLSLFast, which hint logical shift number is up to 3.

Allen abandoned this revision.Sep 20 2023, 7:18 PM