From 6c0e6ef4938809fd84c86107ab93fd328b7f9c59 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 27 Oct 2016 18:32:06 +0000 Subject: [PATCH] [X86][AVX512] Fix MUL v8i64 costs on non-AVX512DQ targets git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285329 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86TargetTransformInfo.cpp | 1 + test/Analysis/CostModel/X86/arith.ll | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp index f8d3a04c367..d115eb29745 100644 --- a/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/lib/Target/X86/X86TargetTransformInfo.cpp @@ -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; diff --git a/test/Analysis/CostModel/X86/arith.ll b/test/Analysis/CostModel/X86/arith.ll index 00ec99f352d..2f3f0f9aa73 100644 --- a/test/Analysis/CostModel/X86/arith.ll +++ b/test/Analysis/CostModel/X86/arith.ll @@ -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 -- 2.40.0