[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER
authorCullen Rhodes <cullen.rhodes@arm.com>
Tue, 6 Aug 2019 09:46:13 +0000 (09:46 +0000)
committerCullen Rhodes <cullen.rhodes@arm.com>
Tue, 6 Aug 2019 09:46:13 +0000 (09:46 +0000)
commitced419f4d76a2f8bcd8647f0792e0fc20ad351ed
tree82137fa963f565c842a733ad148b438ff2b85126
parent1eb84c4d063483218abcc8970548e9ac0cb691e1
[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER

Summary:
Before this patch MGATHER/MSCATTER is capable of representing all
common addressing modes, but only when illegal types are used.
This patch adds an IndexType property so more representations
are available when using legal types only.

Original modes:
 vector of bases
 base + vector of signed scaled offsets

New modes:
 base + vector of signed unscaled offsets
 base + vector of unsigned scaled offsets
 base + vector of unsigned unscaled offsets

The current behaviour of addressing modes for gather/scatter remains
unchanged.

Patch by Paul Walker.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D65636

llvm-svn: 368008
llvm/include/llvm/CodeGen/ISDOpcodes.h
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp