| Chris Lattner | 30555b0 | 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 | ; | ||||
| Reid Spencer | a551c04 | 2007-04-15 09:21:47 +0000 | [diff] [blame^] | 3 | ; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\ |
| 4 | ; RUN: grep {shl .*, 9} | ||||
| Chris Lattner | 30555b0 | 2005-05-07 04:23:29 +0000 | [diff] [blame] | 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 | } | ||||