[PATCH] D130868: [LV] Refactor getExtendedAddReductionCost to support other extended reduction more than Add.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 07:34:22 PDT 2022


dmgreen added a comment.

I see - this sounds OK to me. I'm a little surprised that RISCV would want to use inloop reductions, but if they perform an extend then that might make sense. It sounds like we could generalize a few things, we have only needed extended add and mla in the past.



================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:2351
+        thisT()->getArithmeticInstrCost(Instruction::Mul, ExtTy, CostKind);
+    ExtCost *= 2;
 
----------------
Fold the ExtCost *= 2 into the return statement below?


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1708
+    break;
+  // TODO: Add other Op, for example: FADD?
+  default:
----------------
You can remove this - there are no other ops under MVE


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130868



More information about the llvm-commits mailing list