Chris Lattner | 5cc924a | 2005-05-07 04:23:29 +0000 | [diff] [blame^] | 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 | } |