OSDN Git Service

[AArch64][SVE] Add support for trunc to <vscale x N x i1>.
authorEli Friedman <efriedma@quicinc.com>
Tue, 14 Jul 2020 20:02:58 +0000 (13:02 -0700)
committerEli Friedman <efriedma@quicinc.com>
Mon, 20 Jul 2020 20:11:02 +0000 (13:11 -0700)
commitb8f765a1e17f8d212ab1cd8f630d35adc7495556
treed0acdf7c43ae466b8185548f1b353086748c1d1e
parentf07ddbc9c4b66e91aa7a106042512ee903b6b3ba
[AArch64][SVE] Add support for trunc to <vscale x N x i1>.

This isn't a natively supported operation, so convert it to a
mask+compare.

In addition to the operation itself, fix up some surrounding stuff to
make the testcase work: we need concat_vectors on i1 vectors, we need
legalization of i1 vector truncates, and we need to fix up all the
relevant uses of getVectorNumElements().

Differential Revision: https://reviews.llvm.org/D83811
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/test/CodeGen/AArch64/sve-trunc.ll