DAGLegalize: add last-ditch type-legalization for VSELECT.
authorTim Northover <tnorthover@apple.com>
Fri, 4 Apr 2014 14:49:30 +0000 (14:49 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 4 Apr 2014 14:49:30 +0000 (14:49 +0000)
commit0e5eaae1cbc18c349a6cbe135ab64a3b0c59d377
tree63aff60bc5eea3afb981d791b26c0fcc7d2ae4d3
parent07a8ff4892b2a54f0bd5843f863bcffa7a258f1f
DAGLegalize: add last-ditch type-legalization for VSELECT.

When LLVM sees something like (v1iN (vselect v1i1, v1iN, v1iN)) it can
decide that the result is OK (v1i64 is legal on AArch64, for example)
but it still need scalarising because of that v1i1. There was no code
to do this though.

AArch64 and ARM64 have DAG combines to produce efficient code and
prevent that occuring in *most* such situations, but there are edge
cases that they miss. This adds a legalization to cope with that.

llvm-svn: 205626
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/test/CodeGen/ARM64/neon-v1i1-setcc.ll