[AArch64][SVE] Handle more cases in findMoreOptimalIndexType.
authorSander de Smalen <sander.desmalen@arm.com>
Mon, 28 Feb 2022 11:32:05 +0000 (11:32 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Mon, 28 Feb 2022 12:13:52 +0000 (12:13 +0000)
commit201e3686ab4533213e6d72d192d4493002ffa679
treeb836be7dcf773a825e955cfdbeac26df900568d2
parentee95fe5caa3c32a1a9de6c487bbbc78af837af61
[AArch64][SVE] Handle more cases in findMoreOptimalIndexType.

This patch addresses @paulwalker-arm's comment on D117900 to
only update/write the by-ref operands iff the function returns
true. It also handles a few more cases where a series of added
offsets can be folded into the base pointer, rather than just looking
at a single offset.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D119728
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/sve-gather-scatter-addr-opts.ll