blob: fd49e7d3f22320965a863d004a1464a65e61fee1 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; With shl->mul reassociation, we can see that this is (shl A, 9) * A
2;
Tanya Lattner028031a2008-03-19 04:36:04 +00003; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis |\
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004; RUN: grep {shl .*, 9}
5
Tanya Lattner028031a2008-03-19 04:36:04 +00006define 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
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011}
Tanya Lattner028031a2008-03-19 04:36:04 +000012