Skip to content

Commit

Permalink
[X86][Costmodel] getReplicationShuffleCost(): promote 1 bit-wide el…
Browse files Browse the repository at this point in the history
…ements to 32 bit when have AVX512DQ

I believe, this effectively completes `X86TTIImpl::getReplicationShuffleCost()`
for AVX512, other than the question of handling plain AVX512F,
where we end up with some really ugly "shuffles",
but then is there any CPU's that support AVX512, but not AVX512DQ/AVX512BW?

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D114315
  • Loading branch information
LebedevRI committed Nov 24, 2021
1 parent 408c0cc commit cd8d219
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/lib/Target/X86/X86TargetTransformInfo.cpp
Expand Up @@ -3772,6 +3772,10 @@ X86TTIImpl::getReplicationShuffleCost(Type *EltTy, int ReplicationFactor,
PromEltTyBits = 16; // promote to i16, AVX512BW.
break;
}
if (ST->hasDQI()) {
PromEltTyBits = 32; // promote to i32, AVX512F.
break;
}
return bailout();
default:
return bailout();
Expand Down

0 comments on commit cd8d219

Please sign in to comment.