[PATCH] D27846: [SLP] Support for horizontal min/max reduction

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 09:37:01 PDT 2017


RKSimon added inline comments.


================
Comment at: include/llvm/CodeGen/BasicTTIImpl.h:1242
+  /// The cost model should take into account that the actual length of the
+  /// vector is reduced on each iteration.
+  unsigned getMinMaxReductionCost(Type *Ty, Type *CondTy, bool IsPairwise) {
----------------
This seems the same as the comment before getArithmeticReductionCost - in which case is it worth keeping?


================
Comment at: include/llvm/CodeGen/BasicTTIImpl.h:1296
+                                        /*Extract=*/true) +
+           static_cast<T *>(this)->getCmpSelInstrCost(
+               Instruction::Select, ScalarTy, ScalarCondTy, nullptr);
----------------
ConcreteTTI->getCmpSelInstrCost(


https://reviews.llvm.org/D27846





More information about the llvm-commits mailing list