[AArch64][SVE2] Delete an unused parameter for isExtPartOfAvgExpr, NFC
Depend on D157628, which set the cost of extends 0 because they will fold into the s/urhadd. Reviewed By: kmclaughlin Differential Revision: https://reviews.llvm.org/D159273
This commit is contained in:
@@ -2049,10 +2049,8 @@ bool AArch64TTIImpl::isWideningInstruction(Type *DstTy, unsigned Opcode,
|
||||
// %y = (zext i8 -> i16)
|
||||
// trunc i16 (lshr (add %x, %y), 1) -> i8
|
||||
//
|
||||
bool AArch64TTIImpl::isExtPartOfAvgExpr(const Instruction *ExtUser,
|
||||
const CastInst *Ext, Type *Dst,
|
||||
bool AArch64TTIImpl::isExtPartOfAvgExpr(const Instruction *ExtUser, Type *Dst,
|
||||
Type *Src) {
|
||||
|
||||
// The source should be a legal vector type.
|
||||
if (!Src->isVectorTy() || !TLI->isTypeLegal(TLI->getValueType(DL, Src)) ||
|
||||
(Src->isScalableTy() && !ST->hasSVE2()))
|
||||
@@ -2120,7 +2118,7 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
|
||||
|
||||
// The cast will be free for the s/urhadd instructions
|
||||
if ((isa<ZExtInst>(I) || isa<SExtInst>(I)) &&
|
||||
isExtPartOfAvgExpr(SingleUser, cast<CastInst>(I), Dst, Src))
|
||||
isExtPartOfAvgExpr(SingleUser, Dst, Src))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,8 +163,7 @@ public:
|
||||
TTI::TargetCostKind CostKind,
|
||||
const Instruction *I = nullptr);
|
||||
|
||||
bool isExtPartOfAvgExpr(const Instruction *ExtUser, const CastInst *Ext,
|
||||
Type *Dst, Type *Src);
|
||||
bool isExtPartOfAvgExpr(const Instruction *ExtUser, Type *Dst, Type *Src);
|
||||
|
||||
InstructionCost getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src,
|
||||
TTI::CastContextHint CCH,
|
||||
|
||||
Reference in New Issue
Block a user