[llvm] [SystemZ] Provide improved cost estimates (PR #83873)

Kai Nacke via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 11:03:46 PST 2024


================
@@ -1284,17 +1286,43 @@ InstructionCost SystemZTTIImpl::getInterleavedMemoryOpCost(
   return NumVectorMemOps + NumPermutes;
 }
 
-static int getVectorIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy) {
+static int
+getVectorIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy,
+                            const SmallVectorImpl<Type *> &ParamTys) {
   if (RetTy->isVectorTy() && ID == Intrinsic::bswap)
     return getNumVectorRegs(RetTy); // VPERM
+
+  if (ID == Intrinsic::vector_reduce_add) {
+    // Retrieve number and size of elements for the vector op
----------------
redstar wrote:

Comments should be prose with proper punctuation.  (see https://llvm.org/docs/CodingStandards.html#commenting)


https://github.com/llvm/llvm-project/pull/83873


More information about the llvm-commits mailing list