[ARM] Ensure instructions are simplified prior to GatherScatter lowering.
authorDavid Green <david.green@arm.com>
Thu, 10 Jun 2021 19:18:12 +0000 (20:18 +0100)
committerDavid Green <david.green@arm.com>
Thu, 10 Jun 2021 19:18:12 +0000 (20:18 +0100)
commite0c605f6383c5a3aa8f5fa34ed4be9dc51b4a2ae
tree6022461ec528f54e6cd412766bf628ce4e9fcd03
parent4b5c6c5c4b9293557ec8e76d6500527e5d8f9611
[ARM] Ensure instructions are simplified prior to GatherScatter lowering.

Surprisingly, not all instructions are always simplified after unrolling
and before MVE gather/scatter lowering. Notably dead gather operations
can be left around which cause the gather/scatter lowering pass to crash
if there are multiple gathers, some of which are dead.

This patch ensures they are simplified before we modify anything, which
can change some of the existing tests, including making them no-longer
test what they originally tested. This uses a combination of disabling
the gather/scatter lowering pass and adjusting the test to keep them as
before.

Differential Revision: https://reviews.llvm.org/D103150
llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/remat-vctp.ll
llvm/test/CodeGen/Thumb2/lsll0.ll
llvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll
llvm/test/CodeGen/Thumb2/mve-gather-unused.ll [new file with mode: 0644]
llvm/test/CodeGen/Thumb2/mve-phireg.ll
llvm/test/CodeGen/Thumb2/mve-pred-xor.ll
llvm/test/CodeGen/Thumb2/mve-selectcc.ll
llvm/test/CodeGen/Thumb2/mve-vqdmulh.ll