[PATCH] D53573: [TTI] Fix uses of SK_ExtractSubvector shuffle costs (PR39368)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 23 07:44:28 PDT 2018
RKSimon created this revision.
RKSimon added reviewers: ABataev, dtemirbulatov, fhahn, mssimpso, javed.absar, spatel.
Correct costings of SK_ExtractSubvector requires the SubTy argument to indicate the type/size of the extracted subvector.
Unlike the rest of the shuffle kinds this means that the main Ty argument represents the source vector type not the destination - if anyone wants to 'flip' this now is the time to ask before we start adding more reduction support!
I've done my best to fix a number of vectorizer uses:
SLP - AFAICT the reduction epilogue costs should be using a SK_PermuteSingleSrc shuffle as these all occur at the hardware vector width - we're not extracting (illegal) subvector types. This is causing the cost model diffs as SK_ExtractSubvector costs are poorly handled and tend to just return 1 at the moment.
LV - I'm not clear on what the SK_ExtractSubvector should represents for recurrences - I've used a <1 x ?> subvector extraction as that seems to match the VF delta but I need help here (@fhahn? @mssimpso?).
Repository:
rL LLVM
https://reviews.llvm.org/D53573
Files:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/CodeGen/BasicTTIImpl.h
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Analysis/CostModel/AArch64/vector-reduce.ll
test/Analysis/CostModel/X86/reduce-add.ll
test/Analysis/CostModel/X86/reduce-and.ll
test/Analysis/CostModel/X86/reduce-mul.ll
test/Analysis/CostModel/X86/reduce-or.ll
test/Analysis/CostModel/X86/reduce-smax.ll
test/Analysis/CostModel/X86/reduce-smin.ll
test/Analysis/CostModel/X86/reduce-umax.ll
test/Analysis/CostModel/X86/reduce-umin.ll
test/Analysis/CostModel/X86/reduce-xor.ll
test/Analysis/CostModel/X86/reduction.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53573.170639.patch
Type: text/x-patch
Size: 221117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181023/c995ae66/attachment-0001.bin>
More information about the llvm-commits
mailing list