Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; 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 | |||||
6 | int %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 | } |