projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
test that the ppc backend can do 64-bit cntlz
[oota-llvm.git]
/
test
/
CodeGen
/
PowerPC
/
div-2.ll
1
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi &&
2
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep blr
3
4
int %test1(int %X) {
5
%Y = and int %X, 15
6
%Z = div int %Y, 4
7
ret int %Z
8
}
9
10
int %test2(int %W) {
11
%X = and int %W, 15
12
%Y = sub int 16, %X
13
%Z = div int %Y, 4
14
ret int %Z
15
}
16
17
int %test3(int %W) {
18
%X = and int %W, 15
19
%Y = sub int 15, %X
20
%Z = div int %Y, 4
21
ret int %Z
22
}
23
24
int %test4(int %W) {
25
%X = and int %W, 2
26
%Y = sub int 5, %X
27
%Z = div int %Y, 2
28
ret int %Z
29
}