1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -verify-machineinstrs -mattr=+mve %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc <2 x i64> @ctlz_2i64_0_t(<2 x i64> %src){
5 ; CHECK-LABEL: ctlz_2i64_0_t:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vmov r0, r1, d1
8 ; CHECK-NEXT: clz r0, r0
9 ; CHECK-NEXT: cmp r1, #0
10 ; CHECK-NEXT: cset r2, ne
11 ; CHECK-NEXT: adds r0, #32
12 ; CHECK-NEXT: cmp r2, #0
14 ; CHECK-NEXT: clzne r0, r1
15 ; CHECK-NEXT: vmov s2, r0
16 ; CHECK-NEXT: vmov r0, r1, d0
17 ; CHECK-NEXT: vldr s1, .LCPI0_0
18 ; CHECK-NEXT: vmov.f32 s3, s1
19 ; CHECK-NEXT: clz r0, r0
20 ; CHECK-NEXT: cmp r1, #0
21 ; CHECK-NEXT: cset r2, ne
22 ; CHECK-NEXT: adds r0, #32
23 ; CHECK-NEXT: cmp r2, #0
25 ; CHECK-NEXT: clzne r0, r1
26 ; CHECK-NEXT: vmov s0, r0
28 ; CHECK-NEXT: .p2align 2
29 ; CHECK-NEXT: @ %bb.1:
30 ; CHECK-NEXT: .LCPI0_0:
31 ; CHECK-NEXT: .long 0x00000000 @ float 0
33 %0 = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %src, i1 0)
37 define arm_aapcs_vfpcc <4 x i32> @ctlz_4i32_0_t(<4 x i32> %src){
38 ; CHECK-LABEL: ctlz_4i32_0_t:
39 ; CHECK: @ %bb.0: @ %entry
40 ; CHECK-NEXT: vclz.i32 q0, q0
43 %0 = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %src, i1 0)
47 define arm_aapcs_vfpcc <8 x i16> @ctlz_8i16_0_t(<8 x i16> %src){
48 ; CHECK-LABEL: ctlz_8i16_0_t:
49 ; CHECK: @ %bb.0: @ %entry
50 ; CHECK-NEXT: vclz.i16 q0, q0
53 %0 = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %src, i1 0)
57 define arm_aapcs_vfpcc <16 x i8> @ctlz_16i8_0_t(<16 x i8> %src){
58 ; CHECK-LABEL: ctlz_16i8_0_t:
59 ; CHECK: @ %bb.0: @ %entry
60 ; CHECK-NEXT: vclz.i8 q0, q0
63 %0 = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %src, i1 0)
67 define arm_aapcs_vfpcc <2 x i64> @ctlz_2i64_1_t(<2 x i64> %src){
68 ; CHECK-LABEL: ctlz_2i64_1_t:
69 ; CHECK: @ %bb.0: @ %entry
70 ; CHECK-NEXT: vmov r0, r1, d1
71 ; CHECK-NEXT: clz r0, r0
72 ; CHECK-NEXT: cmp r1, #0
73 ; CHECK-NEXT: cset r2, ne
74 ; CHECK-NEXT: adds r0, #32
75 ; CHECK-NEXT: cmp r2, #0
77 ; CHECK-NEXT: clzne r0, r1
78 ; CHECK-NEXT: vmov s2, r0
79 ; CHECK-NEXT: vmov r0, r1, d0
80 ; CHECK-NEXT: vldr s1, .LCPI4_0
81 ; CHECK-NEXT: vmov.f32 s3, s1
82 ; CHECK-NEXT: clz r0, r0
83 ; CHECK-NEXT: cmp r1, #0
84 ; CHECK-NEXT: cset r2, ne
85 ; CHECK-NEXT: adds r0, #32
86 ; CHECK-NEXT: cmp r2, #0
88 ; CHECK-NEXT: clzne r0, r1
89 ; CHECK-NEXT: vmov s0, r0
91 ; CHECK-NEXT: .p2align 2
92 ; CHECK-NEXT: @ %bb.1:
93 ; CHECK-NEXT: .LCPI4_0:
94 ; CHECK-NEXT: .long 0x00000000 @ float 0
96 %0 = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %src, i1 1)
100 define arm_aapcs_vfpcc <4 x i32> @ctlz_4i32_1_t(<4 x i32> %src){
101 ; CHECK-LABEL: ctlz_4i32_1_t:
102 ; CHECK: @ %bb.0: @ %entry
103 ; CHECK-NEXT: vclz.i32 q0, q0
106 %0 = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %src, i1 1)
110 define arm_aapcs_vfpcc <8 x i16> @ctlz_8i16_1_t(<8 x i16> %src){
111 ; CHECK-LABEL: ctlz_8i16_1_t:
112 ; CHECK: @ %bb.0: @ %entry
113 ; CHECK-NEXT: vclz.i16 q0, q0
116 %0 = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %src, i1 1)
120 define arm_aapcs_vfpcc <16 x i8> @ctlz_16i8_1_t(<16 x i8> %src){
121 ; CHECK-LABEL: ctlz_16i8_1_t:
122 ; CHECK: @ %bb.0: @ %entry
123 ; CHECK-NEXT: vclz.i8 q0, q0
126 %0 = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %src, i1 1)
131 declare <2 x i64> @llvm.ctlz.v2i64(<2 x i64>, i1)
132 declare <4 x i32> @llvm.ctlz.v4i32(<4 x i32>, i1)
133 declare <8 x i16> @llvm.ctlz.v8i16(<8 x i16>, i1)
134 declare <16 x i8> @llvm.ctlz.v16i8(<16 x i8>, i1)