Skip to content

Commit 1921822

Browse files
committed
Adjust extended reduction cost
Change-Id: Ie2795e0e5ebb0589146eaf07c752410e307a36e6
1 parent bb3c2fc commit 1921822

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1794,6 +1794,7 @@ InstructionCost ARMTTIImpl::getExtendedReductionCost(
17941794
case ISD::ADD:
17951795
if (ST->hasMVEIntegerOps() && ValVT.isSimple() && ResVT.isSimple()) {
17961796
std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(ValTy);
1797+
17971798
// The legal cases are:
17981799
// VADDV u/s 8/16/32
17991800
// VADDLV u/s 32
@@ -1805,7 +1806,7 @@ InstructionCost ARMTTIImpl::getExtendedReductionCost(
18051806
((LT.second == MVT::v16i8 && RevVTSize <= 32) ||
18061807
(LT.second == MVT::v8i16 && RevVTSize <= 32) ||
18071808
(LT.second == MVT::v4i32 && RevVTSize <= 64)))
1808-
return ST->getMVEVectorCostFactor(CostKind) * LT.first;
1809+
return 3 * ST->getMVEVectorCostFactor(CostKind) * LT.first;
18091810
}
18101811
break;
18111812
default:

0 commit comments

Comments
 (0)