This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix MVE ldst offset ranges
ClosedPublic

Authored by dmgreen on Aug 30 2019, 5:13 AM.

Details

Summary

We were using isShiftedInt<7, Shift>(RHSC) to detect the ranges of offsets to fold into MVE loads/stores. The instructions actually take a 7 bit unsigned integer which is either added or subtracted. So something more like isShiftedUInt<7, Shift>(abs(RHSC)).

Instead I've changes this to use the isScaledConstantInRange method, same as in SelectT2AddrModeImm7Offset used by pre/post inc, which seemed to already be getting this correct.

I've also added some extra testing around the negative extreme ranges, for which the differences are shown here.

Diff Detail

Repository
rL LLVM

Event Timeline

dmgreen created this revision.Aug 30 2019, 5:13 AM
This revision is now accepted and ready to land.Sep 3 2019, 1:42 AM
This revision was automatically updated to reflect the committed changes.