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 llvm-svn: 17704
Loading
Please register or sign in to comment