[PATCH] D159273: [AArch64] Delete an unused parameter for isExtPartOfAvgExpr, NFC

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 08:50:11 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf41223eecaeb: [AArch64][SVE2] Delete an unused parameter for isExtPartOfAvgExpr, NFC (authored by Allen).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159273/new/

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
@@ -2049,10 +2049,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()))
@@ -2120,7 +2118,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.555398.patch
Type: text/x-patch
Size: 1834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230901/b49dd8f2/attachment.bin>


More information about the llvm-commits mailing list