[PowerPC] Exploit single instruction load-and-splat for word and doubleword
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 17 Sep 2019 16:45:20 +0000 (16:45 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 17 Sep 2019 16:45:20 +0000 (16:45 +0000)
commit1461fb6e783cb946b061f66689b419f74f7fad63
treeea1e7a3d9569550c4a1c217572e7ae6e868cb7e8
parent4e9082ef95db5d760df4cce00a4351fa122176d6
[PowerPC] Exploit single instruction load-and-splat for word and doubleword

We currently produce a load, followed by (possibly a move for integers and) a
splat as separate instructions. VSX has always had a splatting load for
doublewords, but as of Power9, we have it for words as well. This patch just
exploits these instructions.

Differential revision: https://reviews.llvm.org/D63624

llvm-svn: 372139
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/PowerPC/PPCInstrAltivec.td
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/VSX-XForm-Scalars.ll
llvm/test/CodeGen/PowerPC/build-vector-tests.ll
llvm/test/CodeGen/PowerPC/load-and-splat.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/power9-moves-and-splats.ll
llvm/test/CodeGen/PowerPC/qpx-load-splat.ll
llvm/test/CodeGen/PowerPC/swaps-le-7.ll