LLVM backend for 6502
Go to file
Bill Schmidt fc22bfd921 [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics
This patch enables the vec_vsx_ld and vec_vsx_st intrinsics for
PowerPC, which provide programmer access to the lxvd2x, lxvw4x,
stxvd2x, and stxvw4x instructions.

New LLVM intrinsics are provided to represent these four instructions
in IntrinsicsPowerPC.td.  These are patterned after the similar
intrinsics for lvx and stvx (Altivec).  In PPCInstrVSX.td, these
intrinsics are tied to the code gen patterns, with additional patterns
to allow plain vanilla loads and stores to still generate these
instructions.

At -O1 and higher the intrinsics are immediately converted to loads
and stores in InstCombineCalls.cpp.  This will open up more
optimization opportunities while still allowing the correct
instructions to be generated.  (Similar code exists for aligned
Altivec loads and stores.)

The new intrinsics are added to the code that checks for consecutive
loads and stores in PPCISelLowering.cpp, as well as to
PPCTargetLowering::getTgtMemIntrinsic().

There's a new test to verify the correct instructions are generated.
The loads and stores tend to be reordered, so the test just counts
their number.  It runs at -O2, as it's not very effective to test this
at -O0, when many unnecessary loads and stores are generated.

I ended up having to modify vsx-fma-m.ll.  It turns out this test case
is slightly unreliable, but I don't know a good way to prevent
problems with it.  The xvmaddmdp instructions read and write the same
register, which is one of the multiplicands.  Commutativity allows
either to be chosen.  If the FMAs are reordered differently than
expected by the test, the register assignment can be different as a
result.  Hopefully this doesn't change often.

There is a companion patch for Clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221767 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-12 04:19:40 +00:00
autoconf Add a check for misbehaving -Wcomment from gcc-4.7 and add 2014-11-05 00:35:15 +00:00
bindings [OCaml] Fix mismatched CAMLparam/CAMLreturn. 2014-11-03 11:47:14 +00:00
cmake Pass PRIVATE to target_link_libraries if using shared libraries. 2014-11-07 15:33:56 +00:00
docs configure.ac lives in autoconf/, not autotools/ 2014-11-10 22:36:04 +00:00
examples [CMake] llvm/examples: Update libdeps for unoptimized builds. 2014-10-31 15:27:16 +00:00
include [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics 2014-11-12 04:19:40 +00:00
lib [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics 2014-11-12 04:19:40 +00:00
projects
test [PowerPC] Add vec_vsx_ld and vec_vsx_st intrinsics 2014-11-12 04:19:40 +00:00
tools Remove the now unused StringRefMemoryObject.h. 2014-11-12 02:13:27 +00:00
unittests Ensure function_refs are copyable even from non-const references 2014-11-12 02:06:08 +00:00
utils Make TreePattern::error use Twine 2014-11-11 23:48:11 +00:00
.arcconfig
.clang-format
.clang-tidy Enable display of compiler diagnostics in clang-tidy by default. 2014-10-29 17:29:38 +00:00
.gitignore Initial version of Go bindings. 2014-10-16 22:48:02 +00:00
CMakeLists.txt Pass PRIVATE to target_link_libraries if using shared libraries. 2014-11-07 15:33:56 +00:00
CODE_OWNERS.TXT Add Tom Stellard's role as 3.5 release manager. 2014-09-12 08:07:31 +00:00
configure Add a check for misbehaving -Wcomment from gcc-4.7 and add 2014-11-05 00:35:15 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in Add a check for misbehaving -Wcomment from gcc-4.7 and add 2014-11-05 00:35:15 +00:00
Makefile.rules Add a check for misbehaving -Wcomment from gcc-4.7 and add 2014-11-05 00:35:15 +00:00
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.