[PowerPC] Try to simplify a Swap if it feeds a Splat
authorStefan Pintilie <stefanp@ca.ibm.com>
Tue, 24 Oct 2017 17:44:27 +0000 (17:44 +0000)
committerStefan Pintilie <stefanp@ca.ibm.com>
Tue, 24 Oct 2017 17:44:27 +0000 (17:44 +0000)
commit8f0c78309562cef845cf0e130c8be2ff2a19295b
treec35fbd2fd6a5cbaa0a3c301aac7534b5247bc262
parentb8522bd97d57d6876ad6c1a33874e98282045529
[PowerPC] Try to simplify a Swap if it feeds a Splat

If we have the situation where a Swap feeds a Splat we can sometimes change the
  index on the Splat and then remove the Swap instruction.

Fixed the test case that was failing and recommit after pulling the original
  commit.

  Original revision is here: https://reviews.llvm.org/D39009

llvm-svn: 316478
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
llvm/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll
llvm/test/CodeGen/PowerPC/ppc64-peephole-swap.ll [new file with mode: 0644]