Dan Gohman | 1880092 | 2009-09-11 18:01:28 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -instcombine -S | grep ashr |
Dan Gohman | 5a3eecd | 2008-05-07 00:35:55 +0000 | [diff] [blame] | 2 | |
3 | define i32 @foo(i32 %x, i32 %y) { | ||||
4 | %a = and i32 %x, 7 | ||||
5 | %b = and i32 %y, 7 | ||||
6 | %c = mul i32 %a, %b | ||||
7 | %d = shl i32 %c, 26 | ||||
8 | %e = ashr i32 %d, 26 | ||||
9 | ret i32 %e | ||||
10 | } |