@@ -1388,57 +1388,6 @@ InstructionCost SystemZTTIImpl::getInterleavedMemoryOpCost(
1388
1388
return NumVectorMemOps + NumPermutes;
1389
1389
}
1390
1390
1391
- // EXPERIMENTAL
1392
- static cl::opt<unsigned > REDLIM (" redlim" , cl::init(0 ));
1393
-
1394
- InstructionCost getFPReductionCost (unsigned NumVec, unsigned ScalarBits) {
1395
- unsigned NumEltsPerVecReg = (SystemZ::VectorBits / ScalarBits);
1396
- InstructionCost Cost = 0 ;
1397
- Cost += NumVec - 1 ; // Full vector operations.
1398
- Cost += NumEltsPerVecReg; // Last vector scalar operations.
1399
- return Cost;
1400
- }
1401
-
1402
- InstructionCost
1403
- SystemZTTIImpl::getArithmeticReductionCost (unsigned Opcode, VectorType *Ty,
1404
- std::optional<FastMathFlags> FMF,
1405
- TTI::TargetCostKind CostKind) {
1406
- if (!TTI::requiresOrderedReduction (FMF) && ST->hasVector () &&
1407
- (Opcode == Instruction::FAdd || Opcode == Instruction::FMul)) {
1408
- unsigned NumVectors = getNumVectorRegs (Ty);
1409
- unsigned ScalarBits = Ty->getScalarSizeInBits ();
1410
-
1411
- // // EXPERIMENTAL: better to not vectorize small vectors?:
1412
- // unsigned NumElts = cast<FixedVectorType>(Ty)->getNumElements();
1413
- // if (NumElts <= REDLIM)
1414
- // return NumVectors * 8; // => MachineCombiner
1415
-
1416
- // // EXPERIMENTAL: Return a low cost to enable heavily.
1417
- // return NumVectors / 2;
1418
-
1419
- return getFPReductionCost (NumVectors, ScalarBits);
1420
- }
1421
-
1422
- return BaseT::getArithmeticReductionCost (Opcode, Ty, FMF, CostKind);
1423
- }
1424
-
1425
- InstructionCost
1426
- SystemZTTIImpl::getMinMaxReductionCost (Intrinsic::ID IID, VectorType *Ty,
1427
- FastMathFlags FMF,
1428
- TTI::TargetCostKind CostKind) {
1429
- if (Ty->isFPOrFPVectorTy () && ST->hasVectorEnhancements1 ()) {
1430
- unsigned NumVectors = getNumVectorRegs (Ty);
1431
- unsigned ScalarBits = Ty->getScalarSizeInBits ();
1432
-
1433
- // // EXPERIMENTAL: Return a low cost to enable heavily.
1434
- // return NumVectors / 2;
1435
-
1436
- return getFPReductionCost (NumVectors, ScalarBits);
1437
- }
1438
-
1439
- return BaseT::getMinMaxReductionCost (IID, Ty, FMF, CostKind);
1440
- }
1441
-
1442
1391
static int
1443
1392
getVectorIntrinsicInstrCost (Intrinsic::ID ID, Type *RetTy,
1444
1393
const SmallVectorImpl<Type *> &ParamTys) {
0 commit comments