llvm/lib
Chris Lattner 1877ec9b02 For functions that use vector registers, save VRSAVE, mark used
registers, and update it on entry to each function, then restore it on exit.

This compiles:

void func(vfloat *a, vfloat *b, vfloat *c) {
        *a = *b * *c + *c;
}

to this:

_func:
        mfspr r2, 256
        oris r6, r2, 49152
        mtspr 256, r6
        lvx v0, 0, r5
        lvx v1, 0, r4
        vmaddfp v0, v1, v0, v0
        stvx v0, 0, r3
        mtspr 256, r2
        blr

GCC produces this (which has additional stack accesses):

_func:
        mfspr r0,256
        stw r0,-4(r1)
        oris r0,r0,0xc000
        mtspr 256,r0
        lvx v0,0,r5
        lvx v1,0,r4
        lwz r12,-4(r1)
        vmaddfp v0,v0,v1,v0
        stvx v0,0,r3
        mtspr 256,r12
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 21:52:10 +00:00
..
Analysis Fix PR681 by using the standard Lengauer and Tarjan algorithm for dominator 2006-03-11 02:20:46 +00:00
Archive
AsmParser Regenerate 2006-03-04 07:53:41 +00:00
Bytecode Handle the removal of the debug chain. 2006-03-13 13:07:37 +00:00
CodeGen make sure dead token factor nodes are removed by the dag combiner. 2006-03-13 18:37:30 +00:00
Debugger Handle the removal of the debug chain. 2006-03-13 13:07:37 +00:00
ExecutionEngine Add a helper method for running static ctors/dtors in the module. 2006-03-08 18:42:46 +00:00
Linker
Support Qualify dwarf namespace inside llvm namespace. 2006-02-27 22:37:23 +00:00
System
Target For functions that use vector registers, save VRSAVE, mark used 2006-03-13 21:52:10 +00:00
Transforms Handle the removal of the debug chain. 2006-03-13 13:07:37 +00:00
VMCore Bring makefile back into compliance with standard by using 2006-03-13 17:57:31 +00:00
Makefile