LLVM backend for 6502
Go to file
Chris Lattner b3ddfc42af add two dag combines:
(C1-X) == C2 --> X == C1-C2
(X+C1) == C2 --> X == C2-C1

This allows us to compile this:

bool %X(int %X) {
        %Y = add int %X, 14
        %Z = setne int %Y, 12345
        ret bool %Z
}

into this:

_X:
        cmpl $12331, 4(%esp)
        setne %al
        movzbl %al, %eax
        andl $1, %eax
        ret

not this:

_X:
        movl $14, %eax
        addl 4(%esp), %eax
        cmpl $12345, %eax
        setne %al
        movzbl %al, %eax
        andl $1, %eax
        ret

Testcase here: Regression/CodeGen/X86/compare-add.ll

nukage of the and coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-02 06:36:13 +00:00
autoconf don't need this any more; the "#define hashes to trees" hack is coming 2006-01-23 06:47:56 +00:00
docs Remove FAKE_SOURCES 2006-01-27 22:06:01 +00:00
examples When a function takes a variable number of pointer arguments, with a zero 2005-10-23 04:37:20 +00:00
include/llvm add an instance var and argument. 2006-02-02 00:23:12 +00:00
lib add two dag combines: 2006-02-02 06:36:13 +00:00
projects Fixed Makefile so it does, indeed, build a dynamic library. 2006-01-06 22:51:19 +00:00
runtime fix make install/uninstall of libcrtend. 2006-01-30 02:03:56 +00:00
test new testcase 2006-02-02 06:35:38 +00:00
tools Pass plugins on to children when optimizing. 2006-01-26 18:37:21 +00:00
utils add a note, ya knoe 2006-02-01 19:12:23 +00:00
win32 Add _CRT_SECURE_NO_DEPRECATE preprocessor symbol to make VS2005 happy. 2006-01-30 04:07:08 +00:00
Xcode Catch up on some of the file addition/deletions. 2006-01-27 13:24:20 +00:00
.cvsignore
configure Update for including additional function tests. 2006-01-23 08:15:53 +00:00
CREDITS.TXT Add an entry 2006-01-08 08:25:38 +00:00
LICENSE.TXT Happy New Year, LLVM. 2006-01-03 14:42:06 +00:00
llvm.spec
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in Implement fix for PR471: 2005-12-21 03:31:53 +00:00
Makefile.rules * Eliminate FAKE_SOURCES 2006-01-27 22:13:12 +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 HTML documentation provided in docs/index.html for further
assistance with LLVM.