blob: 82b0832895a998a8897425532d291e693ff4ae43 [file] [log] [blame]
John Bauman66b8ab22014-05-06 15:57:45 -04001; With shl->mul reassociation, we can see that this is (shl A, 9) * A
2;
3; RUN: opt < %s -reassociate -instcombine -S |\
4; RUN: grep {shl .*, 9}
5
6define i32 @test(i32 %A, i32 %B) {
7 %X = shl i32 %A, 5 ; <i32> [#uses=1]
8 %Y = shl i32 %A, 4 ; <i32> [#uses=1]
9 %Z = mul i32 %Y, %X ; <i32> [#uses=1]
10 ret i32 %Z
11}
12