[llvm] r290812 - Fixed shuffle-reverse cost on AVX-512.

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 2 03:44:10 PST 2017


Author: delena
Date: Mon Jan  2 05:44:10 2017
New Revision: 290812

URL: http://llvm.org/viewvc/llvm-project?rev=290812&view=rev
Log:
Fixed shuffle-reverse cost on AVX-512.

(This changed was approved in https://reviews.llvm.org/D28118, but Simon asked to submit it separately).


Modified:
    llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
    llvm/trunk/test/Analysis/CostModel/X86/shuffle-reverse.ll

Modified: llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp?rev=290812&r1=290811&r2=290812&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp Mon Jan  2 05:44:10 2017
@@ -614,6 +614,7 @@ int X86TTIImpl::getShuffleCost(TTI::Shuf
 
     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
     };

Modified: llvm/trunk/test/Analysis/CostModel/X86/shuffle-reverse.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/shuffle-reverse.ll?rev=290812&r1=290811&r2=290812&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/shuffle-reverse.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/shuffle-reverse.ll Mon Jan  2 05:44:10 2017
@@ -122,7 +122,8 @@ define void @test_vXi16(<8 x i16> %src12
   ; 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




More information about the llvm-commits mailing list