LLVM backend for 6502
Go to file
Chris Lattner 90564f26d1 Implement an important entry from README_ALTIVEC:
If an altivec predicate compare is used immediately by a branch, don't
use a (serializing) MFCR instruction to read the CR6 register, which requires
a compare to get it back to CR's.  Instead, just branch on CR6 directly. :)

For example, for:
void foo2(vector float *A, vector float *B) {
  if (!vec_any_eq(*A, *B))
    *B = (vector float){0,0,0,0};
}

We now generate:

_foo2:
        mfspr r2, 256
        oris r5, r2, 12288
        mtspr 256, r5
        lvx v2, 0, r4
        lvx v3, 0, r3
        vcmpeqfp. v2, v3, v2
        bne cr6, LBB1_2 ; UnifiedReturnBlock
LBB1_1: ; cond_true
        vxor v2, v2, v2
        stvx v2, 0, r4
        mtspr 256, r2
        blr
LBB1_2: ; UnifiedReturnBlock
        mtspr 256, r2
        blr

instead of:

_foo2:
        mfspr r2, 256
        oris r5, r2, 12288
        mtspr 256, r5
        lvx v2, 0, r4
        lvx v3, 0, r3
        vcmpeqfp. v2, v3, v2
        mfcr r3, 2
        rlwinm r3, r3, 27, 31, 31
        cmpwi cr0, r3, 0
        beq cr0, LBB1_2 ; UnifiedReturnBlock
LBB1_1: ; cond_true
        vxor v2, v2, v2
        stvx v2, 0, r4
        mtspr 256, r2
        blr
LBB1_2: ; UnifiedReturnBlock
        mtspr 256, r2
        blr

This implements CodeGen/PowerPC/vec_br_cmp.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27804 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 17:59:36 +00:00
autoconf Make it possible to default the llvm_src and llvm_obj variables based on 2006-04-18 06:25:37 +00:00
docs Add some more notes, many still missing 2006-04-18 06:32:08 +00:00
examples Minor corrections. 2006-03-24 03:11:31 +00:00
include/llvm Fix a copy & paste error from long ago. 2006-04-18 16:03:18 +00:00
lib Implement an important entry from README_ALTIVEC: 2006-04-18 17:59:36 +00:00
projects Have the AutoRegen.sh script prompt the user for the LLVM src and obj 2006-04-18 06:27:47 +00:00
runtime Invert the tests on LLVMGCC_MAJVERS to check for value 4 instead of value 2006-04-07 21:45:23 +00:00
test new testcase 2006-04-18 17:56:30 +00:00
tools Add a warning. 2006-04-18 05:31:20 +00:00
utils Fix a build failure on Vladimir's tester. 2006-04-18 00:21:25 +00:00
win32 Keep Visual Studio happy. 2006-04-11 02:01:22 +00:00
Xcode Misc. project changes. html + build config changes supplied by Devang. 2006-04-08 06:04:56 +00:00
.cvsignore Ignore stuff built by "make dist". 2006-04-07 15:55:18 +00:00
configure Ahem. HEAD -> 1.8cvs not 1.7 (I'm an idiot). 2006-04-14 03:01:27 +00:00
CREDITS.TXT quick update 2006-04-13 02:05:30 +00:00
LICENSE.TXT Happy New Year, LLVM. 2006-01-03 14:42:06 +00:00
llvm.spec For PR723: 2006-04-07 16:07:37 +00:00
llvm.spec.in For PR723: 2006-04-07 16:07:37 +00:00
Makefile Include the win32 and Xcode directories in the distribution. 2006-04-12 20:53:14 +00:00
Makefile.common
Makefile.config.in Fix a comment. 2006-04-09 23:39:43 +00:00
Makefile.rules Make sure that the C Frontend's runtime library directory is included as 2006-04-12 18:21:35 +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.