[X86][AVX] Combine vpermi(bitcast(x)) -> bitcast(vpermi(x))
commitb61e023778f7b8e32142ac965983c0ac79467d2f
authorSimon Pilgrim <lvm-dev@redking.me.uk>
Wed, 3 Jul 2019 14:34:16 +0000 (3 14:34 +0000)
committerSimon Pilgrim <lvm-dev@redking.me.uk>
Wed, 3 Jul 2019 14:34:16 +0000 (3 14:34 +0000)
tree69df142316bc4548c505d7b1d73936c02da95cee
parentbae03fc6328c7ecbfc01f201d231a66b51a6de20
[X86][AVX] Combine vpermi(bitcast(x)) -> bitcast(vpermi(x))

iff the number of elements doesn't change.

This gets around an issue with combineX86ShuffleChain not being able to hint which domain is preferred for shuffles that can be done with either.

Fixes regression introduced in rL365041

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365044 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx512-shuffles/partial_permute.ll