[Hexagon] Custom lower VECTOR_SHUFFLE and EXTRACT_SUBVECTOR for HVX
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 29 Jul 2016 16:44:27 +0000 (16:44 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 29 Jul 2016 16:44:27 +0000 (16:44 +0000)
commit0bd55a7608098ebacd4f8bd4a83a15bc1b3e7206
tree7556e05822bd5220fdbac8db5f28fa25d145f5bf
parent6731dead227b7a8783a67c40ba05a04288cc364b
[Hexagon] Custom lower VECTOR_SHUFFLE and EXTRACT_SUBVECTOR for HVX

If the mask of a vector shuffle has alternating odd or even numbers
starting with 1 or 0 respectively up to the largest possible index
for the given type in the given HVX mode (single of double) we can
generate vpacko or vpacke instruction respectively.

E.g.
  %42 = shufflevector <32 x i16> %37, <32 x i16> %41,
                      <32 x i32> <i32 1, i32 3, ..., i32 63>
  is %42.h = vpacko(%41.w, %37.w)

Patch by Pranav Bhandarkar.

llvm-svn: 277168
llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
llvm/lib/Target/Hexagon/HexagonISelLowering.h
llvm/lib/Target/Hexagon/HexagonInstrInfoV60.td
llvm/test/CodeGen/Hexagon/lower-extract-subvector.ll [new file with mode: 0644]
llvm/test/CodeGen/Hexagon/vdmpy-halide-test.ll [new file with mode: 0644]
llvm/test/CodeGen/Hexagon/vmpa-halide-test.ll [new file with mode: 0644]
llvm/test/CodeGen/Hexagon/vpack_eo.ll [new file with mode: 0644]