1 ; RUN: llc -march=arc < %s | FileCheck %s
5 declare i32 @llvm.ctlz.i32(i32, i1)
6 declare i32 @llvm.cttz.i32(i32, i1)
9 ; CHECK: fls.f %r0, %r0
10 ; CHECK-NEXT: mov.eq %r0, 32
11 ; CHECK-NEXT: rsub.ne %r0, %r0, 31
12 define i32 @clz32(i32 %x) {
13 %a = call i32 @llvm.ctlz.i32(i32 %x, i1 false)
18 ; CHECK: ffs.f %r0, %r0
19 ; CHECK-NEXT: mov.eq %r0, 32
20 define i32 @ctz32(i32 %x) {
21 %a = call i32 @llvm.cttz.i32(i32 %x, i1 false)