llvm-6502/lib
Chris Lattner 4468c22458 Implement an item from the readme, folding vcmp/vcmp. instructions with
identical instructions into a single instruction.  For example, for:

void test(vector float *x, vector float *y, int *P) {
  int v = vec_any_out(*x, *y);
  *x = (vector float)vec_cmpb(*x, *y);
  *P = v;
}

we now generate:

_test:
        mfspr r2, 256
        oris r6, r2, 49152
        mtspr 256, r6
        lvx v0, 0, r4
        lvx v1, 0, r3
        vcmpbfp. v0, v1, v0
        mfcr r4, 2
        stvx v0, 0, r3
        rlwinm r3, r4, 27, 31, 31
        xori r3, r3, 1
        stw r3, 0(r5)
        mtspr 256, r2
        blr

instead of:

_test:
        mfspr r2, 256
        oris r6, r2, 57344
        mtspr 256, r6
        lvx v0, 0, r4
        lvx v1, 0, r3
        vcmpbfp. v2, v1, v0
        mfcr r4, 2
***     vcmpbfp v0, v1, v0
        rlwinm r4, r4, 27, 31, 31
        stvx v0, 0, r3
        xori r3, r4, 1
        stw r3, 0(r5)
        mtspr 256, r2
        blr

Testcase here: CodeGen/PowerPC/vcmp-fold.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-31 06:02:07 +00:00
..
Analysis If adding a link to a collapsed, node, ignore offset. 2006-03-27 23:39:58 +00:00
Archive more C++ daintiness 2005-12-26 14:31:26 +00:00
AsmParser Add new generated files. 2006-03-23 23:48:12 +00:00
Bytecode Handle the removal of the debug chain. 2006-03-13 13:07:37 +00:00
CodeGen Make sure to pass enough values to phi nodes when we are dealing with 2006-03-31 02:12:18 +00:00
Debugger Handle new forms of llvm.dbg intrinsics. 2006-03-23 18:06:46 +00:00
ExecutionEngine Get JIT/Interpreter working on Windows again. 2006-03-24 02:53:49 +00:00
Linker Rename method 2006-01-24 04:14:29 +00:00
Support Qualify dwarf namespace inside llvm namespace. 2006-02-27 22:37:23 +00:00
System Convert llvm.cs.uiuc.edu -> llvm.org 2006-03-14 05:54:52 +00:00
Target Implement an item from the readme, folding vcmp/vcmp. instructions with 2006-03-31 06:02:07 +00:00
Transforms Fix Transforms/InstCombine/2006-03-30-ExtractElement.ll 2006-03-30 22:02:40 +00:00
VMCore Add a new method to verify intrinsic function prototypes. 2006-03-31 04:46:47 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00