[SVE][CodeGen] Lower scalable masked gathers
commitf6dd32fd3584380730a09b042cfbac852f36eb00
authorKerry McLaughlin <kerry.mclaughlin@arm.com>
Mon, 7 Dec 2020 10:39:04 +0000 (7 10:39 +0000)
committerKerry McLaughlin <kerry.mclaughlin@arm.com>
Mon, 7 Dec 2020 12:20:41 +0000 (7 12:20 +0000)
treec71118b60c305c92d94e92e8e5a7ee157d9cccd7
parent980618145bf00a8e212cf3c6db46fb0a83081d69
[SVE][CodeGen] Lower scalable masked gathers

Lowers the llvm.masked.gather intrinsics (scalar plus vector addressing mode only)

Changes in this patch:
- Add custom lowering for MGATHER, using getGatherVecOpcode() to choose the appropriate
  gather load opcode to use.
- Improve codegen with refineIndexType/refineUniformBase, added in D90942
- Tests added for gather loads with 32 & 64-bit scaled & unscaled offsets.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D91092
12 files changed:
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/test/CodeGen/AArch64/sve-masked-gather-32b-signed-scaled.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-masked-gather-32b-signed-unscaled.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-masked-gather-32b-unsigned-scaled.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-masked-gather-32b-unsigned-unscaled.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-masked-gather-64b-scaled.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-masked-gather-64b-unscaled.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/sve-masked-gather-legalize.ll [new file with mode: 0644]