[PATCH] D55615: [CostModel][X86] Don't count 2 shuffles on the last level of a pairwise arithmetic or min/max reduction

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 12 13:38:53 PST 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, ABataev.

This is split from D55452 <https://reviews.llvm.org/D55452> with the correct patch this time.

Pairwise reductions require two shuffles on every level but the last. On the last level the two shuffles are <1, u, u, u...> and <0, u, u, u...>, but <0, u, u, u...> will be dropped by InstCombine/DAGCombine as being an identity shuffle.


https://reviews.llvm.org/D55615

Files:
  include/llvm/CodeGen/BasicTTIImpl.h
  test/Analysis/CostModel/X86/reduction.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55615.177905.patch
Type: text/x-patch
Size: 28962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181212/d31166cd/attachment.bin>


More information about the llvm-commits mailing list