1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64 | FileCheck %s
3 ; RUN: llc < %s -mtriple=aarch64 --global-isel | FileCheck %s --check-prefix=GISEL
5 define i35 @f(i35 %0) {
8 ; CHECK-NEXT: sbfx x8, x0, #0, #35
9 ; CHECK-NEXT: mov w9, #1 // =0x1
10 ; CHECK-NEXT: sdiv x10, x9, x8
11 ; CHECK-NEXT: msub x8, x10, x8, x9
12 ; CHECK-NEXT: clz x8, x8
13 ; CHECK-NEXT: sub x8, x8, #29
14 ; CHECK-NEXT: ubfx x0, x8, #5, #30
19 ; GISEL-NEXT: sbfx x8, x0, #0, #35
20 ; GISEL-NEXT: mov w9, #1 // =0x1
21 ; GISEL-NEXT: sdiv x10, x9, x8
22 ; GISEL-NEXT: msub x8, x10, x8, x9
23 ; GISEL-NEXT: and x8, x8, #0x7ffffffff
24 ; GISEL-NEXT: clz x8, x8
25 ; GISEL-NEXT: sub x8, x8, #29
26 ; GISEL-NEXT: ubfx x0, x8, #5, #30
29 %3 = call i35 @llvm.ctlz.i35(i35 %2, i1 false)
34 declare i35 @llvm.ctlz.i35(i35, i1 immarg)