1; RUN: llc -mcpu=g5 < %s | FileCheck %s 2target datalayout = "E-m:e-i64:64-n32:64" 3target triple = "powerpc64-unknown-linux-gnu" 4 5define i32 @_ZNK4llvm5APInt17countLeadingZerosEv(i64 *%t) nounwind { 6 %tmp19 = load i64, i64* %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] 11 ret i32 %tmp90 12 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 17; CHECK-NEXT: blr 18} 19 20declare i64 @llvm.ctlz.i64(i64, i1) 21