[PowerPC] add a peephole to remove redundant swap instructions after vector splats...
authorTing Wang <Ting.Wang.SH@ibm.com>
Fri, 3 Feb 2023 01:52:52 +0000 (20:52 -0500)
committerTing Wang <Ting.Wang.SH@ibm.com>
Fri, 3 Feb 2023 01:52:52 +0000 (20:52 -0500)
commit1d8f13ae4538fe49ecf3f59ddbd4e63b911107da
tree5fb7e20e5589d199039441b8564abbe5e5b8fb65
parent41fdb4c53f44281e4c7e26c2571395b9fc692cc4
[PowerPC] add a peephole to remove redundant swap instructions after vector splats on P8

Vector store on P8 little endian will have swap instruction added before
the store in PPCISelLowring. If the vector is generated by splat, the
swap instruction can be eliminated.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D139691
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
llvm/test/CodeGen/PowerPC/VSX-XForm-Scalars.ll
llvm/test/CodeGen/PowerPC/aix-vsx-splatimm.ll
llvm/test/CodeGen/PowerPC/canonical-merge-shuffles.ll
llvm/test/CodeGen/PowerPC/load-and-splat.ll