llvm-6502/lib/CodeGen/SelectionDAG
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
..
DAGCombiner.cpp fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2) 2006-03-04 23:33:26 +00:00
LegalizeDAG.cpp Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR. 2006-03-03 07:01:07 +00:00
Makefile
ScheduleDAG.cpp Added an offset field to ConstantPoolSDNode. 2006-02-25 09:54:52 +00:00
ScheduleDAGList.cpp A bit more tweaking 2006-03-03 06:23:43 +00:00
ScheduleDAGSimple.cpp
SelectionDAG.cpp SDOperand::isOperand should not be a forwarding. It must check *this against N's operands. 2006-03-03 06:42:32 +00:00
SelectionDAGISel.cpp Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR. 2006-03-03 07:01:07 +00:00
SelectionDAGPrinter.cpp
TargetLowering.cpp Number of NodeTypes now exceeds 128. 2006-03-03 06:58:59 +00:00