projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Some code clean up.
[oota-llvm.git]
/
test
/
Transforms
/
InstCombine
/
apint-shift-simplify.ll
1
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
2
; RUN: egrep {shl|lshr|ashr} | count 3
3
4
define 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
11
define 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
18
define 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
}