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)
commit659e09e3729b903ee299300e4d29a482ce986bab
tree9e7df90d53353b6a30255931ba24330a12afc4fa
parent4a4d62bfb923f81d0cc8203bdca487a764bb0945
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205626 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/ARM64/neon-v1i1-setcc.ll