llvm-6502/lib/Transforms
Chris Lattner 50af16a97b Simplify handling of shifts to be the same as we do for adds. Add support
for (X * C1) + (X * C2) (where * can be mul or shl), allowing us to fold:

   Y+Y+Y+Y+Y+Y+Y+Y

into
         %tmp.8 = shl long %Y, ubyte 3           ; <long> [#uses=1]

instead of

        %tmp.4 = shl long %Y, ubyte 2           ; <long> [#uses=1]
        %tmp.12 = shl long %Y, ubyte 2          ; <long> [#uses=1]
        %tmp.8 = add long %tmp.4, %tmp.12               ; <long> [#uses=1]

This implements add.ll:test25

Also add support for (X*C1)-(X*C2) -> X*(C1-C2), implementing sub.ll:test18


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17704 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 19:50:12 +00:00
..
Hello Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
Instrumentation Remove dead vars 2004-11-05 04:46:22 +00:00
IPO Actually, leave the check in. This prevents us from counting dead arguments 2004-11-11 07:47:54 +00:00
Scalar Simplify handling of shifts to be the same as we do for adds. Add support 2004-11-13 19:50:12 +00:00
Utils Lazily create the abort message, so only translation units that use unwind 2004-11-13 19:07:32 +00:00
ExprTypeConvert.cpp Add includes and use std:: for standard library calls to make code 2004-09-28 14:42:44 +00:00
LevelRaise.cpp Prototype more accurately 2004-09-20 04:43:57 +00:00
Makefile Change Library Names Not To Conflict With Others When Installed 2004-10-27 23:18:45 +00:00
TransformInternals.cpp Merge i*.h headers into Instructions.h as part of bug403. 2004-07-29 12:17:34 +00:00
TransformInternals.h Convert 'struct' to 'class' in various places to adhere to the coding standards 2004-10-27 16:14:51 +00:00