blob: 6ca6622467ff92e698cca1cb8347839a04dae13d [file] [log] [blame]
Chris Lattner5cc924a2005-05-07 04:23:29 +00001; 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
5int %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}