llvm.org GIT mirror llvm / 0086ec9
[X86][AVX2] Fix costs for v4i64 ashr by splat git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303022 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 3 years ago
2 changed file(s) with 7 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
470470 if (ST->hasSSE2() &&
471471 ((Op2Info == TargetTransformInfo::OK_UniformConstantValue) ||
472472 (Op2Info == TargetTransformInfo::OK_UniformValue))) {
473
474 // Handle AVX2 uniform v4i64 ISD::SRA, it's not worth a table.
475 if (ISD == ISD::SRA && LT.second == MVT::v4i64 && ST->hasAVX2())
476 return LT.first * 4; // 2*psrad + shuffle.
477
473478 if (const auto *Entry =
474479 CostTableLookup(SSE2UniformShiftCostTable, ISD, LT.second))
475480 return LT.first * Entry->Cost;
191191 ; SSE2: Found an estimated cost of 8 for instruction: %shift
192192 ; SSE41: Found an estimated cost of 8 for instruction: %shift
193193 ; AVX: Found an estimated cost of 10 for instruction: %shift
194 ; AVX2: Found an estimated cost of 10 for instruction: %shift
194 ; AVX2: Found an estimated cost of 4 for instruction: %shift
195195 ; AVX512: Found an estimated cost of 1 for instruction: %shift
196196 ; XOP: Found an estimated cost of 6 for instruction: %shift
197197 %insert = insertelement <4 x i64> undef, i64 %b, i32 0
205205 ; SSE2: Found an estimated cost of 16 for instruction: %shift
206206 ; SSE41: Found an estimated cost of 16 for instruction: %shift
207207 ; AVX: Found an estimated cost of 20 for instruction: %shift
208 ; AVX2: Found an estimated cost of 20 for instruction: %shift
208 ; AVX2: Found an estimated cost of 8 for instruction: %shift
209209 ; AVX512: Found an estimated cost of 1 for instruction: %shift
210210 ; XOP: Found an estimated cost of 12 for instruction: %shift
211211 %insert = insertelement <8 x i64> undef, i64 %b, i32 0