• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -instcombine -S | \
2; RUN:    egrep {shl|lshr|ashr} | count 3
3
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}
24