[PATCH] D94913: [SLP] match maxnum/minnum intrinsics as FP reduction ops

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 09:19:24 PST 2021


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7106-7108
+          TTI->getIntrinsicInstrCost(VecAttr, TTI::TCK_RecipThroughput);
+      ScalarCost =
+          TTI->getIntrinsicInstrCost(ScaAttr, TTI::TCK_RecipThroughput);
----------------
ABataev wrote:
> Probably better to use getMinMaxReductionCost rather than the cost of the intrinsic call, it is more precise.
Ok - I'll update. The current patch is actually wrong because I did not use the correct reduction IDs (`Intrinsic::vector_reduce_fmax`) for the vector cost.


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

https://reviews.llvm.org/D94913



More information about the llvm-commits mailing list