[PATCH] D55480: [CostModel][X86][AArch64] Adjust cost of the scalarization part of min/max reduction.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 8 13:55:18 PST 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.
Herald added subscribers: kristof.beyls, javed.absar.

The comment says we need 3 extracts and a select at the end. But didn't we just account for the select in the vector cost above. Aren't we just extracting the single element after taking the min/max in the vector register?


Repository:
  rL LLVM

https://reviews.llvm.org/D55480

Files:
  include/llvm/CodeGen/BasicTTIImpl.h
  test/Analysis/CostModel/AArch64/vector-reduce.ll
  test/Analysis/CostModel/X86/reduce-smax-widen.ll
  test/Analysis/CostModel/X86/reduce-smax.ll
  test/Analysis/CostModel/X86/reduce-smin-widen.ll
  test/Analysis/CostModel/X86/reduce-smin.ll
  test/Analysis/CostModel/X86/reduce-umax-widen.ll
  test/Analysis/CostModel/X86/reduce-umax.ll
  test/Analysis/CostModel/X86/reduce-umin-widen.ll
  test/Analysis/CostModel/X86/reduce-umin.ll
  test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55480.177400.patch
Type: text/x-patch
Size: 284443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181208/7011cc13/attachment-0001.bin>


More information about the llvm-commits mailing list