OSDN Git Service

[TTI, AArch64] Add transpose shuffle kind
authorMatthew Simpson <mssimpso@codeaurora.org>
Thu, 26 Apr 2018 13:48:33 +0000 (13:48 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Thu, 26 Apr 2018 13:48:33 +0000 (13:48 +0000)
commitdaa39fa1446925871be7c8d7549bb0f635dce66b
treebd76ffdb9feb15bb71925572e8801b345d102bfd
parent9ead1e23d40369808fd4841221183c038718eb74
[TTI, AArch64] Add transpose shuffle kind

This patch adds a new shuffle kind useful for transposing a 2xn matrix. These
transpose shuffle masks read corresponding even- or odd-numbered vector
elements from two n-dimensional source vectors and write each result into
consecutive elements of an n-dimensional destination vector. The transpose
shuffle kind is meant to model the TRN1 and TRN2 AArch64 instructions. As such,
this patch also considers transpose shuffles in the AArch64 implementation of
getShuffleCost.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330941 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/CodeGen/BasicTTIImpl.h
lib/Analysis/TargetTransformInfo.cpp
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
lib/Target/AArch64/AArch64TargetTransformInfo.h
test/Analysis/CostModel/AArch64/shuffle-transpose.ll