blob: 3603604caabcacdaee2f63598377f65fa3fe9356 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; With shl->mul reassociation, we can see that this is (shl A, 9) * A
2;
3; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\
4; RUN: grep {shl .*, 9}
5
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}