[PowerPC] Remove redundant direct moves when extracting integers and converting to FP
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 18 Jul 2016 15:30:00 +0000 (15:30 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Mon, 18 Jul 2016 15:30:00 +0000 (15:30 +0000)
commitd3c284f645f896a0957ec040ac735fe44c53725e
tree382f06adf132566f6b7e3f1aea634f72a0399454
parenta645433c5fac7910c199e8bd381942f2b6f0c0d5
[PowerPC] Remove redundant direct moves when extracting integers and converting to FP

This patch corresponds to review:
https://reviews.llvm.org/D21354

We use direct moves for extracting integer elements from vectors. We also use
direct moves when converting integers to FP. When these operations are chained,
we get a direct move out of a VSR followed by a direct move back into a VSR.
These are redundant - all we need to do is line up the element and convert.

llvm-svn: 275796
llvm/lib/Target/PowerPC/PPCInstrVSX.td
llvm/test/CodeGen/PowerPC/remove-redundant-moves.ll [new file with mode: 0644]