OSDN Git Service

[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)
commitc700b40b547f3401eab615d40dcbca6f158c31f7
tree79057be964dbef051c51c4544eec2ab408ebec2d
parent01544ba3a38ce9f52e32b7f2108b8043f60a9f6e
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288804 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avg.ll
test/CodeGen/X86/broadcast-elm-cross-splat-vec.ll [new file with mode: 0644]
test/CodeGen/X86/vec_shift6.ll
test/CodeGen/X86/vector-shuffle-512-v64.ll