Skip to content

Commit 75be883

Browse files
committed
Adjust extended reduction cost
Change-Id: Ie2795e0e5ebb0589146eaf07c752410e307a36e6
1 parent dcf3cea commit 75be883

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
@@ -1795,6 +1795,7 @@ InstructionCost ARMTTIImpl::getExtendedReductionCost(
17951795
case ISD::ADD:
17961796
if (ST->hasMVEIntegerOps() && ValVT.isSimple() && ResVT.isSimple()) {
17971797
std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(ValTy);
1798+
17981799
// The legal cases are:
17991800
// VADDV u/s 8/16/32
18001801
// VADDLV u/s 32
@@ -1806,7 +1807,7 @@ InstructionCost ARMTTIImpl::getExtendedReductionCost(
18061807
((LT.second == MVT::v16i8 && RevVTSize <= 32) ||
18071808
(LT.second == MVT::v8i16 && RevVTSize <= 32) ||
18081809
(LT.second == MVT::v4i32 && RevVTSize <= 64)))
1809-
return ST->getMVEVectorCostFactor(CostKind) * LT.first;
1810+
return 3 * ST->getMVEVectorCostFactor(CostKind) * LT.first;
18101811
}
18111812
break;
18121813
default:

0 commit comments

Comments
 (0)