LLVM backend for 6502
Go to file
Chris Lattner 350bec0fb9 Add a little dag combine to compile this:
int %AreSecondAndThirdElementsBothNegative(<4 x float>* %in) {
entry:
        %tmp1 = load <4 x float>* %in           ; <<4 x float>> [#uses=1]
        %tmp = tail call int %llvm.ppc.altivec.vcmpgefp.p( int 1, <4 x float> < float 0x7FF8000000000000, float 0.000000e+00, float 0.000000e+00, float 0x7FF8000000000000 >, <4 x float> %tmp1 )           ; <int> [#uses=1]
        %tmp = seteq int %tmp, 0                ; <bool> [#uses=1]
        %tmp3 = cast bool %tmp to int           ; <int> [#uses=1]
        ret int %tmp3
}

into this:

_AreSecondAndThirdElementsBothNegative:
        mfspr r2, 256
        oris r4, r2, 49152
        mtspr 256, r4
        li r4, lo16(LCPI1_0)
        lis r5, ha16(LCPI1_0)
        lvx v0, 0, r3
        lvx v1, r5, r4
        vcmpgefp. v0, v1, v0
        mfcr r3, 2
        rlwinm r3, r3, 27, 31, 31
        mtspr 256, r2
        blr

instead of this:

_AreSecondAndThirdElementsBothNegative:
        mfspr r2, 256
        oris r4, r2, 49152
        mtspr 256, r4
        li r4, lo16(LCPI1_0)
        lis r5, ha16(LCPI1_0)
        lvx v0, 0, r3
        lvx v1, r5, r4
        vcmpgefp. v0, v1, v0
        mfcr r3, 2
        rlwinm r3, r3, 27, 31, 31
        xori r3, r3, 1
        cntlzw r3, r3
        srwi r3, r3, 5
        mtspr 256, r2
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27356 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-02 06:11:11 +00:00
autoconf Update to llvm-config tool, by Erik Kidd: 2006-03-23 23:21:29 +00:00
docs Misunderstanding. 2006-03-27 19:46:38 +00:00
examples Minor corrections. 2006-03-24 03:11:31 +00:00
include/llvm simplify this method 2006-04-02 02:28:52 +00:00
lib Add a little dag combine to compile this: 2006-04-02 06:11:11 +00:00
projects Ignored generated files. 2006-03-23 23:53:13 +00:00
runtime Optimizing to calloc() to malloc() + memset() can be bad on some platforms. 2006-03-13 21:22:43 +00:00
test New testcase that crashes the compiler. 2006-04-02 00:23:59 +00:00
tools Get JIT/Interpreter working on Windows again. 2006-03-24 02:53:49 +00:00
utils Adjust the Intrinsics.gen interface a little bit 2006-04-02 03:35:30 +00:00
win32 Fix tablegen related dependencies in Visual Studio. 2006-04-02 05:20:53 +00:00
Xcode Catch up on some of the file addition/deletions. 2006-01-27 13:24:20 +00:00
.cvsignore Ignore the configure.out file generated by "make reconfigure" 2005-06-18 23:01:25 +00:00
configure Update to llvm-config tool, by Erik Kidd: 2006-03-23 23:21:29 +00:00
CREDITS.TXT Update to llvm-config tool, by Erik Kidd: 2006-03-23 23:21:29 +00:00
LICENSE.TXT Happy New Year, LLVM. 2006-01-03 14:42:06 +00:00
llvm.spec Onward to LLVM-1.6 and beyond! 2005-05-18 20:23:20 +00:00
llvm.spec.in Onward to LLVM-1.6 and beyond! 2005-05-18 20:23:20 +00:00
Makefile For PR614: 2005-08-25 04:59:49 +00:00
Makefile.common Update comments to reflect new variable names. Patch contributed by 2005-02-14 16:02:19 +00:00
Makefile.config.in Update to llvm-config tool, by Erik Kidd: 2006-03-23 23:21:29 +00:00
Makefile.rules Add a facility for invoking the llvm-config tool when linking a program. 2006-03-24 07:36:57 +00:00
README.txt Make the text of this file a little more useful. 2004-09-02 22:49:27 +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.