llvm.org GIT mirror llvm / eaa87ba
test that the ppc backend can do 64-bit cntlz git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35328 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=ppc64 -mcpu=g5 | grep cntlzd
1
2 define i32 @_ZNK4llvm5APInt17countLeadingZerosEv(i64 *%t) {
3 %tmp19 = load i64* %t
4 %tmp23 = tail call i64 @llvm.ctlz.i64( i64 %tmp19 ) ; [#uses=1]
5 %tmp2324 = trunc i64 %tmp23 to i32 ; [#uses=1]
6 %tmp89 = add i32 %tmp2324, -64 ; [#uses=1]
7 %tmp90 = add i32 %tmp89, 0 ; [#uses=1]
8 ret i32 %tmp90
9 }
10
11 declare i64 @llvm.ctlz.i64(i64)
12