This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix MVE gather/scatter merged gep offsets
ClosedPublic

Authored by dmgreen on Jun 14 2022, 3:28 AM.

Details

Summary

This fixes the combining of constant vector GEP operands in the optimization of MVE gather/scatter addresses, when opaque pointers are enabled. As opaque pointers reduce the number of bitcasts between geps, more can be folded than before. This can cause problems if the index types are now different between the two geps.

This fixes that by making sure each constant is scaled appropriately, which has the effect of transforming the geps to have a scale of 1, changing [r0, q0, uxtw #1] gathers to [r0, q0] with a larger q0. This helps use a simpler instruction that doesn't need the extra uxtw.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 14 2022, 3:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2022, 3:28 AM
dmgreen requested review of this revision.Jun 14 2022, 3:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2022, 3:28 AM
samtebbs accepted this revision.Jun 17 2022, 1:54 AM

Nice one.

This revision is now accepted and ready to land.Jun 17 2022, 1:54 AM
This revision was landed with ongoing or failed builds.Jun 22 2022, 3:04 AM
This revision was automatically updated to reflect the committed changes.