blob: a0046fbacb6bd4c316cd8a8ef06a7356e4200b8f [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: egrep {shl|lshr|ashr} | count 3
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
4define i41 @test0(i41 %A, i41 %B, i41 %C) {
5 %X = shl i41 %A, %C
6 %Y = shl i41 %B, %C
7 %Z = and i41 %X, %Y
8 ret i41 %Z
9}
10
11define i57 @test1(i57 %A, i57 %B, i57 %C) {
12 %X = lshr i57 %A, %C
13 %Y = lshr i57 %B, %C
14 %Z = or i57 %X, %Y
15 ret i57 %Z
16}
17
18define i49 @test2(i49 %A, i49 %B, i49 %C) {
19 %X = ashr i49 %A, %C
20 %Y = ashr i49 %B, %C
21 %Z = xor i49 %X, %Y
22 ret i49 %Z
23}