[ARM] Look through concat when lowering in-place shuffles (VZIP, ..)
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 19 Jun 2015 02:32:35 +0000 (02:32 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 19 Jun 2015 02:32:35 +0000 (02:32 +0000)
commitac655060b4d484911579ae663e231da8c23d4211
tree5c4685f36d45baaeca407adbb8eebf255f17d033
parent1d01eeb9de144e51d3034a703750ac9bf1b51843
[ARM] Look through concat when lowering in-place shuffles (VZIP, ..)

Currently, we canonicalize shuffles that produce a result larger than
their operands with:
  shuffle(concat(v1, undef), concat(v2, undef))
->
  shuffle(concat(v1, v2), undef)

because we can access quad vectors (see PerformVECTOR_SHUFFLECombine).

This is useful in the general case, but there are special cases where
native shuffles produce larger results: the two-result ops.

We can look through the concat when lowering them:
  shuffle(concat(v1, v2), undef)
->
  concat(VZIP(v1, v2):0, :1)

This lets us generate the native shuffles instead of scalarizing to
dozens of VMOVs.

Differential Revision: http://reviews.llvm.org/D10424

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240118 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/vtrn.ll
test/CodeGen/ARM/vuzp.ll
test/CodeGen/ARM/vzip.ll