[X86] Improving folding of concat_vectors of subvectors from the same broadcast
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 1 May 2020 10:22:57 +0000 (11:22 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 1 May 2020 10:23:10 +0000 (11:23 +0100)
commit8cbd8194c1aac564879df36931109a5b9f2c1388
treef17ec47b134d1a9e3639c9efd524deb8493c2fac
parentc298e5a022928b59941d74680a41fc9c76038b2a
[X86] Improving folding of concat_vectors of subvectors from the same broadcast

Handle concat_vectors(extract_subvector(broadcast(x)), extract_subvector(broadcast(x))) -> broadcast(x)

To expose this we also need collectConcatOps to recognise the insert_subvector(x, extract_subvector(x, lo), hi) subvector splat pattern
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/combine-bitselect.ll