[PATCH] D159273: [AArch64] Delete an unused parameter for isExtPartOfAvgExpr, NFC
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 31 05:38:47 PDT 2023
Allen created this revision.
Allen added reviewers: kmclaughlin, david-arm.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
Allen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Depend on D157628 <https://reviews.llvm.org/D157628>
https://reviews.llvm.org/D159273
Files:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
Index: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
===================================================================
--- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
+++ llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
@@ -163,8 +163,7 @@
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,
Index: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -2050,10 +2050,8 @@
// %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()))
@@ -2121,7 +2119,7 @@
// 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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159273.554996.patch
Type: text/x-patch
Size: 1834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230831/b6928c80/attachment.bin>
More information about the llvm-commits
mailing list