[X86][AVX512] Detect repeated constant patterns in BUILD_VECTOR suitable for broadcas...
authorAyman Musa <ayman.musa@intel.com>
Tue, 6 Dec 2016 12:24:14 +0000 (12:24 +0000)
committerAyman Musa <ayman.musa@intel.com>
Tue, 6 Dec 2016 12:24:14 +0000 (12:24 +0000)
commit86c00b799f9a4ae4fc892ea22238ba090fafe025
treebb712c3b7492ac52d1bf390e1bb8f2ecb7586e2f
parente004d4bfc25aef1187b0eaf71081c9322a1717ed
[X86][AVX512] Detect repeated constant patterns in BUILD_VECTOR suitable for broadcasting.

Check if a build_vector node includes a repeated constant pattern and replace it with a broadcast of that pattern.
For example:
"build_vector <0, 1, 2, 3, 0, 1, 2, 3>" would be replaced by "broadcast <0, 1, 2, 3>"

Differential Revision: https://reviews.llvm.org/D26802

llvm-svn: 288804
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avg.ll
llvm/test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/vec_shift6.ll
llvm/test/CodeGen/X86/vector-shuffle-512-v64.ll