xref: /llvm-project/llvm/test/CodeGen/Mips/GlobalISel/instruction-select/ctlz.mir (revision 2b66d32f3f4c4ef144e0835029e3ddd071b6ed5a)
1*2b66d32fSPetar Avramovic# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2*2b66d32fSPetar Avramovic# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
3*2b66d32fSPetar Avramovic---
4*2b66d32fSPetar Avramovicname:            ctlz_i32
5*2b66d32fSPetar Avramovicalignment:       4
6*2b66d32fSPetar Avramoviclegalized:       true
7*2b66d32fSPetar AvramovicregBankSelected: true
8*2b66d32fSPetar AvramovictracksRegLiveness: true
9*2b66d32fSPetar Avramovicbody:             |
10*2b66d32fSPetar Avramovic  bb.1.entry:
11*2b66d32fSPetar Avramovic    liveins: $a0
12*2b66d32fSPetar Avramovic
13*2b66d32fSPetar Avramovic    ; MIPS32-LABEL: name: ctlz_i32
14*2b66d32fSPetar Avramovic    ; MIPS32: liveins: $a0
15*2b66d32fSPetar Avramovic    ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
16*2b66d32fSPetar Avramovic    ; MIPS32: [[CLZ:%[0-9]+]]:gpr32 = CLZ [[COPY]]
17*2b66d32fSPetar Avramovic    ; MIPS32: $v0 = COPY [[CLZ]]
18*2b66d32fSPetar Avramovic    ; MIPS32: RetRA implicit $v0
19*2b66d32fSPetar Avramovic    %0:gprb(s32) = COPY $a0
20*2b66d32fSPetar Avramovic    %1:gprb(s32) = G_CTLZ %0(s32)
21*2b66d32fSPetar Avramovic    $v0 = COPY %1(s32)
22*2b66d32fSPetar Avramovic    RetRA implicit $v0
23*2b66d32fSPetar Avramovic
24*2b66d32fSPetar Avramovic...
25