LLVM backend for 6502
Go to file
Chris Lattner 3dd08734c1 optimize bitcasts from large integers to vector into vector
element insertion from the pieces that feed into the vector.
This handles a pattern that occurs frequently due to code
generated for the x86-64 abi.  We now compile something like
this:

struct S { float A, B, C, D; };
struct S g;
struct S bar() { 
  struct S A = g;
  ++A.A;
  ++A.C;
  return A;
}

into all nice vector operations:

_bar:                                   ## @bar
## BB#0:                                ## %entry
	movq	_g@GOTPCREL(%rip), %rax
	movss	LCPI1_0(%rip), %xmm1
	movss	(%rax), %xmm0
	addss	%xmm1, %xmm0
	pshufd	$16, %xmm0, %xmm0
	movss	4(%rax), %xmm2
	movss	12(%rax), %xmm3
	pshufd	$16, %xmm2, %xmm2
	unpcklps	%xmm2, %xmm0
	addss	8(%rax), %xmm1
	pshufd	$16, %xmm1, %xmm1
	pshufd	$16, %xmm3, %xmm2
	unpcklps	%xmm2, %xmm1
	ret

instead of icky integer operations:

_bar:                                   ## @bar
	movq	_g@GOTPCREL(%rip), %rax
	movss	LCPI1_0(%rip), %xmm1
	movss	(%rax), %xmm0
	addss	%xmm1, %xmm0
	movd	%xmm0, %ecx
	movl	4(%rax), %edx
	movl	12(%rax), %esi
	shlq	$32, %rdx
	addq	%rcx, %rdx
	movd	%rdx, %xmm0
	addss	8(%rax), %xmm1
	movd	%xmm1, %eax
	shlq	$32, %rsi
	addq	%rax, %rsi
	movd	%rsi, %xmm1
	ret

This resolves rdar://8360454



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112343 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 01:20:38 +00:00
autoconf Remove getsect checks, the result is unused and is broken anyhow. 2010-08-25 08:44:54 +00:00
bindings - Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings. 2010-08-24 20:00:52 +00:00
cmake Updated CMake library dependencies. Removed unnecessary component name 2010-08-26 02:29:53 +00:00
docs Create the new linker type "linker_private_weak_def_auto". 2010-08-20 22:05:50 +00:00
examples Trailing whitespace. 2010-08-19 20:03:53 +00:00
include Add a prototype of a new peephole optimizing pass that uses LazyValue info to simplify PHIs and select's. 2010-08-27 23:31:36 +00:00
lib optimize bitcasts from large integers to vector into vector 2010-08-28 01:20:38 +00:00
projects
runtime
test optimize bitcasts from large integers to vector into vector 2010-08-28 01:20:38 +00:00
tools Fix the msvs 2010 build. 2010-08-27 02:49:45 +00:00
unittests StringRef::compare_numeric also differed from StringRef::compare for characters > 127. 2010-08-26 15:25:35 +00:00
utils Fix a comment typo. 2010-08-27 21:56:59 +00:00
website
build-for-llvm-top.sh
CMakeLists.txt
configure Regenerate. 2010-08-25 08:45:06 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in
Makefile.rules Fix the "Finished Creating" messages for aliases to print the 2010-08-18 01:35:53 +00:00
ModuleInfo.txt
README.txt (Hopefully) One last test. 2010-07-27 00:04:55 +00:00

\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 HTML documentation provided in docs/index.html for further
assistance with LLVM.

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