[ARM][MVE] Optimise offset addresses of gathers/scatters
authorAnna Welker <anna.welker@arm.com>
Wed, 8 Apr 2020 10:43:55 +0000 (11:43 +0100)
committerAnna Welker <anna.welker@arm.com>
Wed, 8 Apr 2020 10:46:57 +0000 (11:46 +0100)
commit89e1248d7b76886912f499391719e68b27e42ec3
treea801188b8bc1e1508259c2aa32fbc3d27a868755
parent7adb9e06fd0dd49891e491cba9705e9dd119440e
[ARM][MVE] Optimise offset addresses of gathers/scatters

This patch adds an analysis of the offset addresses used by gathers
and scatters to the MVEGatherScatterLowering pass to find
multiplications and additions that are loop invariant and thus can
be moved into the loop preheader, avoiding to execute them each time.

Differential Revision: https://reviews.llvm.org/D76681
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
llvm/test/CodeGen/ARM/O3-pipeline.ll
llvm/test/CodeGen/Thumb2/mve-gather-optimisation-deep.ll [new file with mode: 0644]
llvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll [new file with mode: 0644]