1 ; RUN: llc -verify-machineinstrs -mcpu=g5 < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 define i32 @_ZNK4llvm5APInt17countLeadingZerosEv(ptr %t) nounwind {
6 %tmp19 = load i64, ptr %t
7 %tmp22 = tail call i64 @llvm.ctlz.i64( i64 %tmp19, i1 true ) ; <i64> [#uses=1]
8 %tmp23 = trunc i64 %tmp22 to i32
9 %tmp89 = add i32 %tmp23, -64 ; <i32> [#uses=1]
10 %tmp90 = add i32 %tmp89, 0 ; <i32> [#uses=1]
13 ; CHECK-LABEL: @_ZNK4llvm5APInt17countLeadingZerosEv
14 ; CHECK: ld [[REG1:[0-9]+]], 0(3)
15 ; CHECK-NEXT: cntlzd [[REG2:[0-9]+]], [[REG1]]
16 ; CHECK-NEXT: addi 3, [[REG2]], -64
20 declare i64 @llvm.ctlz.i64(i64, i1)