[llvm] r285329 - [X86][AVX512] Fix MUL v8i64 costs on non-AVX512DQ targets

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 11:32:06 PDT 2016


Author: rksimon
Date: Thu Oct 27 13:32:06 2016
New Revision: 285329

URL: http://llvm.org/viewvc/llvm-project?rev=285329&view=rev
Log:
[X86][AVX512] Fix MUL v8i64 costs on non-AVX512DQ targets

Modified:
    llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
    llvm/trunk/test/Analysis/CostModel/X86/arith.ll

Modified: llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp?rev=285329&r1=285328&r2=285329&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp Thu Oct 27 13:32:06 2016
@@ -522,6 +522,7 @@ int X86TTIImpl::getArithmeticInstrCost(
     // multiplies(3), shifts(4) and adds(2).
     { ISD::MUL,     MVT::v2i64,    9 },
     { ISD::MUL,     MVT::v4i64,    9 },
+    { ISD::MUL,     MVT::v8i64,    9 }
   };
   if (const auto *Entry = CostTableLookup(CustomLowered, ISD, LT.second))
     return LT.first * Entry->Cost;

Modified: llvm/trunk/test/Analysis/CostModel/X86/arith.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/arith.ll?rev=285329&r1=285328&r2=285329&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/arith.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/arith.ll Thu Oct 27 13:32:06 2016
@@ -446,8 +446,8 @@ define i32 @mul(i32 %arg) {
   ; SSE42: cost of 36 {{.*}} %C = mul
   ; AVX: cost of 36 {{.*}} %C = mul
   ; AVX2: cost of 18 {{.*}} %C = mul
-  ; AVX512F: cost of 2 {{.*}} %C = mul
-  ; AVX512BW: cost of 2 {{.*}} %C = mul
+  ; AVX512F: cost of 9 {{.*}} %C = mul
+  ; AVX512BW: cost of 9 {{.*}} %C = mul
   ; AVX512DQ: cost of 1 {{.*}} %C = mul
   %C = mul <8 x i64> undef, undef
 




More information about the llvm-commits mailing list