[CodeGen] Prepare for introduction of v3 and v5 MVTs
authorTim Renouf <tpr.llvm@botech.co.uk>
Sun, 17 Mar 2019 21:43:12 +0000 (21:43 +0000)
committerTim Renouf <tpr.llvm@botech.co.uk>
Sun, 17 Mar 2019 21:43:12 +0000 (21:43 +0000)
commitc302b9b5fe0e6a1e64f7dde40329904a5bdc29f0
treeb4991710333a10869ae2a97345de9d482d75a9c1
parentbaa94ef03bccbaf7d973c340d873abdaa4e36479
[CodeGen] Prepare for introduction of v3 and v5 MVTs

AMDGPU would like to have MVTs for v3i32, v3f32, v5i32, v5f32. This
commit does not add them, but makes preparatory changes:

* Exclude non-legal non-power-of-2 vector types from ComputeRegisterProp
  mechanism in TargetLoweringBase::getTypeConversion.

* Cope with SETCC and VSELECT for odd-width i1 vector when the other
  vectors are legal type.

Some of this patch is from Matt Arsenault, also of AMD.

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

Change-Id: Ib5f23377dbef511be3a936211a0b9f94e46331f8
llvm-svn: 356350
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp