aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-05-06 15:40:46 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2015-05-06 15:40:46 +0000
commit5fe2e25f7c340666092da87cee27b5da614ecdfb (patch)
tree174029c25b7beb86608ee53bcaa32e8fce1df1ba /llvm/lib/CodeGen/MachineInstr.cpp
parentd167d428883ea2c0bf3134e425536c3049ffb748 (diff)
downloadllvm-5fe2e25f7c340666092da87cee27b5da614ecdfb.zip
llvm-5fe2e25f7c340666092da87cee27b5da614ecdfb.tar.gz
llvm-5fe2e25f7c340666092da87cee27b5da614ecdfb.tar.bz2
[PPC64LE] Adjust vector splats during VSX swap optimization
The initial code drop for VSX swap optimization permitted the optimization only when all operations in a web of related computation are lane-insensitive. For some lane-sensitive operations, we can still permit the optimization provided that we make adjustments to those operations. This patch adds special handling for vector splats so that their presence doesn't kill the optimization. Vector splats are lane-sensitive since they identify by number a vector element to be used as the source of a splat. When swap optimizations take place, the desired vector element will move to the opposite doubleword of the quadword vector. We thus replace the index I by (I + N/2) % N, where N is the number of elements in the vector. A new test case is added to test that swap optimization succeeds when vector splats are present, and that the proper input element is used as the source of the splat. An ancillary change removes SH_BUILDVEC as one of the kinds of special handling that may be required by VSX swap optimization. From experience with GCC, I had expected to need some modifications for vector build operations, but I did not find that to be the case. llvm-svn: 236606
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions