[AArch64][SVE] Workaround incorrect types when lowering fixed length gather/scatter
authorBradley Smith <bradley.smith@arm.com>
Thu, 2 Sep 2021 11:06:29 +0000 (11:06 +0000)
committerBradley Smith <bradley.smith@arm.com>
Thu, 2 Sep 2021 15:07:24 +0000 (15:07 +0000)
commit14e1a4a6eef2fb95ec852c9ddfc597f80bba3226
treeae62916911a09c36ae3cc4351dab7c6774c7ac09
parent3fd27ec75909786ea3bddc0872b48ab9b2dffca9
[AArch64][SVE] Workaround incorrect types when lowering fixed length gather/scatter

When lowering a fixed length gather/scatter the index type is assumed to
be the same as the memory type, this is incorrect in cases where the
extension of the index has been folded into the addressing mode.

For now add a temporary workaround to fix the codegen faults caused by
this by preventing the removal of this extension. At a later date the
lowering for SVE gather/scatters will be redesigned to improve the way
addressing modes are handled.

As a short term side effect of this change, the addressing modes
generated for fixed length gather/scatters will not be optimal.

Differential Revision: https://reviews.llvm.org/D109145
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/sve-fixed-length-masked-gather.ll
llvm/test/CodeGen/AArch64/sve-fixed-length-masked-scatter.ll