1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/CodeGen
Bill Schmidt 6661e2ddb2 [PPC64LE] Remove unnecessary swaps from lane-insensitive vector computations
This patch adds a new SSA MI pass that runs on little-endian PPC64
code with VSX enabled. Loads and stores of 4x32 and 2x64 vectors
without alignment constraints are accomplished for little-endian using
lxvd2x/xxswapd and xxswapd/stxvd2x. The existence of the additional
xxswapd instructions hurts performance in comparison with big-endian
code, but they are necessary in the general case to support correct
semantics.

However, the general case does not apply to most vector code. Many
vector instructions are lane-insensitive; they do not "care" which
lanes the parallel computations are performed within, provided that
the resulting data is stored into the correct locations. Thus this
pass looks for computations that perform only lane-insensitive
operations, and remove the unnecessary swaps from loads and stores in
such computations.

Future improvements will allow computations using certain
lane-sensitive operations to also be optimized in this manner, by
modifying the lane-sensitive operations to account for the permuted
order of the lanes. However, this patch only adds the infrastructure
to permit this; no lane-sensitive operations are optimized at this
time.

This code is heavily exercised by the various vectorizing applications
in the projects/test-suite tree. For the time being, I have only added
one simple test case to demonstrate what the pass is doing. Although
it is quite simple, it provides coverage for much of the code,
including the special case handling of copies and subreg-to-reg
operations feeding the swaps. I plan to add additional tests in the
future as I fill in more of the "special handling" code.

Two existing tests were affected, because they expected the swaps to
be present, but they are now removed.

llvm-svn: 235910
2015-04-27 19:57:34 +00:00
..
AArch64 Teach AArch64\lit.local.cfg the new triple names windows-gnu and windows-msvc. 2015-04-24 17:14:16 +00:00
ARM ARM: When re-creating a branch via InsertBranch, preserve CPSR flags. 2015-04-23 20:31:32 +00:00
BPF [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
CPP [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Generic Re-commit r235560: Switch lowering: extract jump tables and bit tests before building binary tree (PR22262) 2015-04-23 16:45:24 +00:00
Hexagon [Hexagon] Use constant extenders to fix up hardware loops 2015-04-27 14:16:43 +00:00
Inputs DebugInfo: Fix bad debug info for compile units and types 2015-03-27 20:46:33 +00:00
Mips Reapply "[mips][FastISel] Implement shift ops for Mips fast-isel."" 2015-04-27 13:28:05 +00:00
MSP430 [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
NVPTX [NVPTX] Emits "generic()" depending on the original address space 2015-04-24 02:57:30 +00:00
PowerPC [PPC64LE] Remove unnecessary swaps from lane-insensitive vector computations 2015-04-27 19:57:34 +00:00
R600 R600: Remove / merge redundant testcases 2015-04-26 00:53:33 +00:00
SPARC [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
SystemZ Allow memory intrinsics to be tail calls 2015-04-13 17:16:45 +00:00
Thumb [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Thumb2 Thumb2: When applying branch optimizations, visit branches in reverse order. 2015-04-23 20:31:35 +00:00
WinEH [SEH] Implement GetExceptionCode in __except blocks 2015-04-24 20:25:05 +00:00
X86 AVX-512: added calling conventions for i1 vectors. 2015-04-27 15:11:19 +00:00
XCore [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00