test that reassociate can handle shifts
[oota-llvm.git] / test / Transforms / Reassociate / shifttest.ll
1 ; With shl->mul reassociation, we can see that this is (shl A, 9) * A
2 ;
3 ; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, ubyte 9'
4
5 int %test(int %A, int %B) {
6         %X = shl int %A, ubyte 5
7         %Y = shl int %A, ubyte 4
8         %Z = mul int %Y, %X
9         ret int %Z
10 }