llvm-6502/lib
Chris Lattner a1deca3cd6 fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
fold (shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)

This allows us to compile CodeGen/PowerPC/addi-reassoc.ll into:

_test1:
        slwi r2, r4, 4
        add r2, r2, r3
        lwz r3, 36(r2)
        blr
_test2:
        mulli r2, r4, 5
        add r2, r2, r3
        lbz r2, 11(r2)
        extsb r3, r2
        blr

instead of:

_test1:
        addi r2, r4, 2
        slwi r2, r2, 4
        add r2, r3, r2
        lwz r3, 4(r2)
        blr
_test2:
        addi r2, r4, 2
        mulli r2, r2, 5
        add r2, r3, r2
        lbz r2, 1(r2)
        extsb r3, r2
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26535 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-04 23:33:26 +00:00
..
Analysis Fix a crash compiling Obsequi 2006-03-04 21:48:01 +00:00
Archive more C++ daintiness 2005-12-26 14:31:26 +00:00
AsmParser Regenerate 2006-03-04 07:53:41 +00:00
Bytecode Simplify the autoupgrade interface 2006-03-02 23:59:12 +00:00
CodeGen fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2) 2006-03-04 23:33:26 +00:00
Debugger dum de dum 2005-12-26 10:24:15 +00:00
ExecutionEngine simplify this code now that each constant pool entry is not separately allocated 2006-02-09 04:49:59 +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 Add AddSymbol() method to DynamicLibrary to work around Windows limitation 2006-01-30 04:33:51 +00:00
Target Add a note 2006-03-04 08:44:51 +00:00
Transforms Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B). 2006-03-04 09:31:13 +00:00
VMCore Unbreak autouprade of llvm.sqrt, simplify some code. 2006-03-03 16:31:22 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00