[X86] Rewrite LowerAVXCONCAT_VECTORS similar to how we handle vXi1 concats.
authorCraig Topper <craig.topper@intel.com>
Tue, 13 Mar 2018 22:05:25 +0000 (22:05 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 13 Mar 2018 22:05:25 +0000 (22:05 +0000)
commitcc060e921b7ee742bae6d961f01ca76183a4c1ea
treeadf49a5850c5e0ef57e0f3ba713bb8611952d5bf
parentbc32433062ad4e2ee7df96fcfdd7426da2cc7a6d
[X86] Rewrite LowerAVXCONCAT_VECTORS similar to how we handle vXi1 concats.

This better able to detect undef and zeros pieces in the concat. Or cases when only one subvector is non-zero. This allows us to avoid silly things like double inserts into progressively larger undefs.

This still builds 512 bit concats of 128 bits by building up through 256 bits first. But I don't know if that's best.

We probably want to merge this with the vXi1 concat code since they are very similar.

llvm-svn: 327454
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/avx512-intrinsics-upgrade.ll