diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2017-01-02 11:44:10 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2017-01-02 11:44:10 +0000 |
commit | d96200d60a429bce4aa959ab2f1571b50d5970c5 (patch) | |
tree | 1da506d33f689525ffbef3e44863e5d139d30fe9 | |
parent | dad96d67515af247a45c8ca1bd4ebb2b27746cac (diff) | |
download | bcm5719-llvm-d96200d60a429bce4aa959ab2f1571b50d5970c5.tar.gz bcm5719-llvm-d96200d60a429bce4aa959ab2f1571b50d5970c5.zip |
Fixed shuffle-reverse cost on AVX-512.
(This changed was approved in https://reviews.llvm.org/D28118, but Simon asked to submit it separately).
llvm-svn: 290812
-rw-r--r-- | llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 1 | ||||
-rw-r--r-- | llvm/test/Analysis/CostModel/X86/shuffle-reverse.ll | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp index 5c021302d8d..2b0e672d56f 100644 --- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp @@ -614,6 +614,7 @@ int X86TTIImpl::getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, static const CostTblEntry AVX512BWShuffleTbl[] = { { ISD::VECTOR_SHUFFLE, MVT::v32i16, 1 }, // vpermw + { ISD::VECTOR_SHUFFLE, MVT::v16i16, 1 }, // vpermw { ISD::VECTOR_SHUFFLE, MVT::v64i8, 6 } // vextracti64x4 + 2*vperm2i128 // + 2*pshufb + vinserti64x4 }; diff --git a/llvm/test/Analysis/CostModel/X86/shuffle-reverse.ll b/llvm/test/Analysis/CostModel/X86/shuffle-reverse.ll index 1b2ecb6bf0d..a1bdda0690a 100644 --- a/llvm/test/Analysis/CostModel/X86/shuffle-reverse.ll +++ b/llvm/test/Analysis/CostModel/X86/shuffle-reverse.ll @@ -122,7 +122,8 @@ define void @test_vXi16(<8 x i16> %src128, <16 x i16> %src256, <32 x i16> %src51 ; SSE42: cost of 2 {{.*}} %V256 = shufflevector ; AVX1: cost of 4 {{.*}} %V256 = shufflevector ; AVX2: cost of 2 {{.*}} %V256 = shufflevector - ; AVX512: cost of 2 {{.*}} %V256 = shufflevector + ; AVX512F: cost of 2 {{.*}} %V256 = shufflevector + ; AVX512BW: cost of 1 {{.*}} %V256 = shufflevector %V256 = shufflevector <16 x i16> %src256, <16 x i16> undef, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0> ; SSE2: cost of 12 {{.*}} %V512 = shufflevector |