1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32
4 define i32 @ctlz_i32(i32 %a) {
5 ; MIPS32-LABEL: ctlz_i32:
6 ; MIPS32: # %bb.0: # %entry
7 ; MIPS32-NEXT: clz $2, $4
11 %0 = call i32 @llvm.ctlz.i32(i32 %a, i1 false)
14 declare i32 @llvm.ctlz.i32(i32, i1 immarg)
17 define i64 @ctlz_i64(i64 %a) {
18 ; MIPS32-LABEL: ctlz_i64:
19 ; MIPS32: # %bb.0: # %entry
20 ; MIPS32-NEXT: ori $3, $zero, 0
21 ; MIPS32-NEXT: clz $1, $4
22 ; MIPS32-NEXT: addiu $1, $1, 32
23 ; MIPS32-NEXT: clz $2, $5
24 ; MIPS32-NEXT: movz $2, $1, $5
28 %0 = call i64 @llvm.ctlz.i64(i64 %a, i1 false)
31 declare i64 @llvm.ctlz.i64(i64, i1 immarg)