1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 target triple = "hexagon"
5 ; Function Attrs: nounwind readnone
6 define i32 @f0(i32 %a0) #0 {
9 %v0 = tail call i32 @llvm.ctlz.i32(i32 %a0, i1 true)
13 ; Function Attrs: nounwind readnone speculatable
14 declare i32 @llvm.ctlz.i32(i32, i1) #1
16 ; Function Attrs: nounwind readnone speculatable
17 declare i64 @llvm.ctlz.i64(i64, i1) #1
19 ; Function Attrs: nounwind readnone
20 define i32 @f1(i32 %a0) #0 {
23 %v0 = tail call i32 @llvm.cttz.i32(i32 %a0, i1 true)
27 ; Function Attrs: nounwind readnone speculatable
28 declare i32 @llvm.cttz.i32(i32, i1) #1
30 ; Function Attrs: nounwind readnone speculatable
31 declare i64 @llvm.cttz.i64(i64, i1) #1
33 ; Function Attrs: nounwind readnone
34 define i32 @f2(i64 %a0) #0 {
37 %v0 = tail call i64 @llvm.ctlz.i64(i64 %a0, i1 true)
38 %v1 = trunc i64 %v0 to i32
42 ; Function Attrs: nounwind readnone
43 define i32 @f3(i64 %a0) #0 {
46 %v0 = tail call i64 @llvm.cttz.i64(i64 %a0, i1 true)
47 %v1 = trunc i64 %v0 to i32
51 attributes #0 = { nounwind readnone }
52 attributes #1 = { nounwind readnone speculatable }