1 ; RUN: llc -march=hexagon < %s | FileCheck %s 2 3 target triple = "hexagon" 4 5 ; Function Attrs: nounwind readnone 6 define i32 @f0(i32 %a0) #0 { 7 b0: 8 ; CHECK: cl0 9 %v0 = tail call i32 @llvm.ctlz.i32(i32 %a0, i1 true) 10 ret i32 %v0 11 } 12 13 ; Function Attrs: nounwind readnone speculatable 14 declare i32 @llvm.ctlz.i32(i32, i1) #1 15 16 ; Function Attrs: nounwind readnone speculatable 17 declare i64 @llvm.ctlz.i64(i64, i1) #1 18 19 ; Function Attrs: nounwind readnone 20 define i32 @f1(i32 %a0) #0 { 21 b0: 22 ; CHECK: ct0 23 %v0 = tail call i32 @llvm.cttz.i32(i32 %a0, i1 true) 24 ret i32 %v0 25 } 26 27 ; Function Attrs: nounwind readnone speculatable 28 declare i32 @llvm.cttz.i32(i32, i1) #1 29 30 ; Function Attrs: nounwind readnone speculatable 31 declare i64 @llvm.cttz.i64(i64, i1) #1 32 33 ; Function Attrs: nounwind readnone 34 define i32 @f2(i64 %a0) #0 { 35 b0: 36 ; CHECK: cl0 37 %v0 = tail call i64 @llvm.ctlz.i64(i64 %a0, i1 true) 38 %v1 = trunc i64 %v0 to i32 39 ret i32 %v1 40 } 41 42 ; Function Attrs: nounwind readnone 43 define i32 @f3(i64 %a0) #0 { 44 b0: 45 ; CHECK: ct0 46 %v0 = tail call i64 @llvm.cttz.i64(i64 %a0, i1 true) 47 %v1 = trunc i64 %v0 to i32 48 ret i32 %v1 49 } 50 51 attributes #0 = { nounwind readnone } 52 attributes #1 = { nounwind readnone speculatable } 53