blob: 3603604caabcacdaee2f63598377f65fa3fe9356 [file] [log] [blame]
Chris Lattner30555b02005-05-07 04:23:29 +00001; With shl->mul reassociation, we can see that this is (shl A, 9) * A
2;
Reid Spencera551c042007-04-15 09:21:47 +00003; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\
4; RUN: grep {shl .*, 9}
Chris Lattner30555b02005-05-07 04:23:29 +00005
6int %test(int %A, int %B) {
7 %X = shl int %A, ubyte 5
8 %Y = shl int %A, ubyte 4
9 %Z = mul int %Y, %X
10 ret int %Z
11}