1 # RUN: llc -O0 -mtriple arm-- -mattr=+v6 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,ARM
2 # RUN: llc -O0 -mtriple thumb-- -mattr=+v6t2 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,THUMB
4 define void @test_clz() { ret void }
8 # CHECK-LABEL: name: test_clz
12 # CHECK: selected: true
14 - { id: 0, class: gprb }
15 - { id: 1, class: gprb }
21 ; ARM: [[VREGX:%[0-9]+]]:gpr = COPY $r0
22 ; THUMB: [[VREGX:%[0-9]+]]:rgpr = COPY $r0
24 %1(s32) = G_CTLZ %0(s32)
25 ; ARM: [[VREGR:%[0-9]+]]:gpr = CLZ [[VREGX]], 14 /* CC::al */, $noreg
26 ; THUMB: [[VREGR:%[0-9]+]]:rgpr = t2CLZ [[VREGX]], 14 /* CC::al */, $noreg
29 ; CHECK: $r0 = COPY [[VREGR]]
31 BX_RET 14, $noreg, implicit $r0
32 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0