llvm-6502/test
Bill Schmidt dcc4f724cc [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235910 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 19:57:34 +00:00
..
Analysis [getUnderlyingOjbects] Analyze loop PHIs further to remove false positives 2015-04-23 20:09:20 +00:00
Assembler IR: Add assembly/bitcode support for function metadata attachments 2015-04-24 22:04:41 +00:00
Bindings
Bitcode [opaque pointer type] bitcode: add explicit callee type to invoke instructions 2015-04-24 18:06:06 +00:00
BugPoint
CodeGen [PPC64LE] Remove unnecessary swaps from lane-insensitive vector computations 2015-04-27 19:57:34 +00:00
DebugInfo
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
Linker Linker: Copy over function metadata attachments 2015-04-24 22:07:31 +00:00
LTO Revert changes to LTO test case since llvm-lto can't handle textual IR inputs 2015-04-24 18:13:27 +00:00
MC [mips] [IAS] Improve warning for using AT with .set noat. 2015-04-27 14:05:04 +00:00
Object
Other
SymbolRewriter
TableGen
tools Make llvm-symbolizer work on Windows. 2015-04-27 17:19:51 +00:00
Transforms Constfold insertelement to undef when index is out-of-bounds 2015-04-27 09:30:49 +00:00
Unit
Verifier [opaque pointer type] Add textual IR support for explicit type parameter to the invoke instruction 2015-04-24 19:32:54 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh