[PATCH] D66997: [ARM] Fix MVE ldst offset ranges

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 05:19:17 PDT 2019


dmgreen created this revision.
dmgreen added reviewers: t.p.northover, simon_tatham, SjoerdMeijer, samparker, ostannard.
Herald added subscribers: hiraditya, kristof.beyls, javed.absar.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D66997

Files:
  llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
  llvm/test/CodeGen/Thumb2/mve-ldst-offset.ll
  llvm/test/CodeGen/Thumb2/mve-loadstore.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66997.218069.patch
Type: text/x-patch
Size: 12619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190830/f5d6206a/attachment.bin>


More information about the llvm-commits mailing list