diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2017-01-02 10:37:52 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2017-01-02 10:37:52 +0000 |
commit | 21706cbd248804520cb093ec17d296e48a89a65b (patch) | |
tree | 044c374e508b92a6e1d3f469bcf1078e4b485ae0 /llvm/lib/Target/X86/X86TargetTransformInfo.h | |
parent | f7d84ee6ff35c6bfe950bbf451c3e84ef23c194f (diff) | |
download | bcm5719-llvm-21706cbd248804520cb093ec17d296e48a89a65b.tar.gz bcm5719-llvm-21706cbd248804520cb093ec17d296e48a89a65b.zip |
AVX-512 Loop Vectorizer: Cost calculation for interleave load/store patterns.
X86 target does not provide any target specific cost calculation for interleave patterns.It uses the common target-independent calculation, which gives very high numbers. As a result, the scalar version is chosen in many cases. The situation on AVX-512 is even worse, since we have 3-src shuffles that significantly reduce the cost.
In this patch I calculate the cost on AVX-512. It will allow to compare interleave pattern with gather/scatter and choose a better solution (PR31426).
* Shiffle-broadcast cost will be changed in Simon's upcoming patch.
Differential Revision: https://reviews.llvm.org/D28118
llvm-svn: 290810
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetTransformInfo.h')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetTransformInfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.h b/llvm/lib/Target/X86/X86TargetTransformInfo.h index 4c256630e92..f6bcb9f569e 100644 --- a/llvm/lib/Target/X86/X86TargetTransformInfo.h +++ b/llvm/lib/Target/X86/X86TargetTransformInfo.h @@ -80,6 +80,13 @@ public: int getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwiseForm); + int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, + unsigned Factor, ArrayRef<unsigned> Indices, + unsigned Alignment, unsigned AddressSpace); + int getInterleavedMemoryOpCostAVX512(unsigned Opcode, Type *VecTy, + unsigned Factor, ArrayRef<unsigned> Indices, + unsigned Alignment, unsigned AddressSpace); + int getIntImmCost(int64_t); int getIntImmCost(const APInt &Imm, Type *Ty); |