[PowerPC] Eliminate loads/swap feeding swap/store for vector type by using big-endian...
authorZi Xuan Wu <wuzish@cn.ibm.com>
Wed, 31 Jul 2019 02:56:00 +0000 (02:56 +0000)
committerZi Xuan Wu <wuzish@cn.ibm.com>
Wed, 31 Jul 2019 02:56:00 +0000 (02:56 +0000)
commite85f6bf66c989270816e67f81576f3d84430c9f9
tree74dac53295c35f0cec037a005f0afd8b7d0b215d
parent2594fa85932a68a904cdb5445dbf7aa231c66e9b
[PowerPC] Eliminate loads/swap feeding swap/store for vector type by using big-endian load/store

In PowerPC, there is instruction to load vector in big endian element order when it's in little endian target.
So we can combine vector load + reverse into big endian load to eliminate the swap instruction.
Also combine vector reverse + store into big endian store.

llvm-svn: 367382
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/build-vector-tests.ll
llvm/test/CodeGen/PowerPC/load-shuffle-and-shuffle-store.ll
llvm/test/CodeGen/PowerPC/vsx_shuffle_le.ll