LLVM backend for 6502
Go to file
Chris Lattner 8a594489bf Fix a long standing deficiency in the X86 backend: we would
sometimes emit "zero" and "all one" vectors multiple times,
for example:

_test2:
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M1
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M2
	ret

instead of:

_test2:
	pcmpeqd	%mm0, %mm0
	movq	%mm0, _M1
	movq	%mm0, _M2
	ret

This patch fixes this by always arranging for zero/one vectors
to be defined as v4i32 or v2i32 (SSE/MMX) instead of letting them be
any random type.  This ensures they get trivially CSE'd on the dag.
This fix is also important for LegalizeDAGTypes, as it gets unhappy
when the x86 backend wants BUILD_VECTOR(i64 0) to be legal even when
'i64' isn't legal.

This patch makes the following changes:

1) X86TargetLowering::LowerBUILD_VECTOR now lowers 0/1 vectors into
   their canonical types.
2) The now-dead patterns are removed from the SSE/MMX .td files.
3) All the patterns in the .td file that referred to immAllOnesV or
   immAllZerosV in the wrong form now use *_bc to match them with a
   bitcast wrapped around them.
4) X86DAGToDAGISel::SelectScalarSSELoad is generalized to handle 
   bitcast'd zero vectors, which simplifies the code actually.
5) getShuffleVectorZeroOrUndef is updated to generate a shuffle that
   is legal, instead of generating one that is illegal and expecting
   a later legalize pass to clean it up.
6) isZeroShuffle is generalized to handle bitcast of zeros.
7) several other minor tweaks.

This patch is definite goodness, but has the potential to cause random
code quality regressions.  Please be on the lookout for these and let 
me know if they happen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-25 00:24:49 +00:00
autoconf Fixing a typo in configure.ac. 2007-10-03 12:06:41 +00:00
bindings Fix ocaml bindings for picky linkers. :) 2007-10-12 19:48:13 +00:00
docs !< is >=, not >. Thanks to Max Hailperin for pointing this out! 2007-11-23 22:19:33 +00:00
examples add a new BF->LLVM translator, contributed by Sterling Stein. 2007-09-12 18:24:00 +00:00
include Several changes: 2007-11-24 07:07:01 +00:00
lib Fix a long standing deficiency in the X86 backend: we would 2007-11-25 00:24:49 +00:00
projects Convert .cvsignore files 2007-06-29 16:35:07 +00:00
runtime GarbageCollection.html is expanded to encompass the coming 2007-09-27 19:31:36 +00:00
test Fix a long standing deficiency in the X86 backend: we would 2007-11-25 00:24:49 +00:00
tools Allow the block extractor take to take a list of basic blocks to not extract 2007-11-14 06:47:06 +00:00
utils add missing #include 2007-11-22 23:19:05 +00:00
website Prepare for "core" website. 2007-08-03 05:43:35 +00:00
win32 This change does a couple of things. First it gets the Visual Studio builds working. 2007-11-21 00:37:56 +00:00
Xcode Removing a dead reference from LLVM.xcodeproj. 2007-11-04 16:12:17 +00:00
build-for-llvm-top.sh Allow the configure options to be set according to the llvm-top options. 2007-08-31 19:53:42 +00:00
configure Regenerate. 2007-10-03 12:07:14 +00:00
CREDITS.TXT Adding myself 2007-10-11 18:54:49 +00:00
LICENSE.TXT Import the boost scoped_ptr class to LLVM. This patch was prepared by 2007-11-15 05:57:06 +00:00
llvm.spec.in * llvm.spec.in: update blurb 2007-07-13 09:48:29 +00:00
Makefile Adding ocaml language bindings for the vmcore and bitwriter libraries. These are 2007-09-18 12:49:39 +00:00
Makefile.common
Makefile.config.in Providing --with-ocaml-libdir for ./configure. The default is the 2007-10-02 16:42:10 +00:00
Makefile.rules noone uses etags. Connected to PR1601 2007-09-26 06:10:47 +00:00
ModuleInfo.txt Update to include clean and install commands. 2007-07-20 20:54:41 +00:00
README.txt test 2007-04-20 20:49:25 +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.