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
3 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -verify-machineinstrs -mattr=+mve %s -early-live-intervals -verify-machineinstrs -o - | FileCheck %s
5 define arm_aapcs_vfpcc <2 x i64> @ctlz_2i64_0_t(<2 x i64> %src){
6 ; CHECK-LABEL: ctlz_2i64_0_t:
7 ; CHECK: @ %bb.0: @ %entry
8 ; CHECK-NEXT: vmov r0, r1, d1
9 ; CHECK-NEXT: clz r0, r0
10 ; CHECK-NEXT: cmp r1, #0
11 ; CHECK-NEXT: add.w r0, r0, #32
13 ; CHECK-NEXT: clzne r0, r1
14 ; CHECK-NEXT: vmov s2, r0
15 ; CHECK-NEXT: vmov r0, r1, d0
16 ; CHECK-NEXT: vldr s1, .LCPI0_0
17 ; CHECK-NEXT: vmov.f32 s3, s1
18 ; CHECK-NEXT: clz r0, r0
19 ; CHECK-NEXT: cmp r1, #0
20 ; CHECK-NEXT: add.w r0, r0, #32
22 ; CHECK-NEXT: clzne r0, r1
23 ; CHECK-NEXT: vmov s0, r0
25 ; CHECK-NEXT: .p2align 2
26 ; CHECK-NEXT: @ %bb.1:
27 ; CHECK-NEXT: .LCPI0_0:
28 ; CHECK-NEXT: .long 0x00000000 @ float 0
30 %0 = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %src, i1 0)
34 define arm_aapcs_vfpcc <4 x i32> @ctlz_4i32_0_t(<4 x i32> %src){
35 ; CHECK-LABEL: ctlz_4i32_0_t:
36 ; CHECK: @ %bb.0: @ %entry
37 ; CHECK-NEXT: vclz.i32 q0, q0
40 %0 = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %src, i1 0)
44 define arm_aapcs_vfpcc <8 x i16> @ctlz_8i16_0_t(<8 x i16> %src){
45 ; CHECK-LABEL: ctlz_8i16_0_t:
46 ; CHECK: @ %bb.0: @ %entry
47 ; CHECK-NEXT: vclz.i16 q0, q0
50 %0 = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %src, i1 0)
54 define arm_aapcs_vfpcc <16 x i8> @ctlz_16i8_0_t(<16 x i8> %src){
55 ; CHECK-LABEL: ctlz_16i8_0_t:
56 ; CHECK: @ %bb.0: @ %entry
57 ; CHECK-NEXT: vclz.i8 q0, q0
60 %0 = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %src, i1 0)
64 define arm_aapcs_vfpcc <2 x i64> @ctlz_2i64_1_t(<2 x i64> %src){
65 ; CHECK-LABEL: ctlz_2i64_1_t:
66 ; CHECK: @ %bb.0: @ %entry
67 ; CHECK-NEXT: vmov r0, r1, d1
68 ; CHECK-NEXT: clz r0, r0
69 ; CHECK-NEXT: cmp r1, #0
70 ; CHECK-NEXT: add.w r0, r0, #32
72 ; CHECK-NEXT: clzne r0, r1
73 ; CHECK-NEXT: vmov s2, r0
74 ; CHECK-NEXT: vmov r0, r1, d0
75 ; CHECK-NEXT: vldr s1, .LCPI4_0
76 ; CHECK-NEXT: vmov.f32 s3, s1
77 ; CHECK-NEXT: clz r0, r0
78 ; CHECK-NEXT: cmp r1, #0
79 ; CHECK-NEXT: add.w r0, r0, #32
81 ; CHECK-NEXT: clzne r0, r1
82 ; CHECK-NEXT: vmov s0, r0
84 ; CHECK-NEXT: .p2align 2
85 ; CHECK-NEXT: @ %bb.1:
86 ; CHECK-NEXT: .LCPI4_0:
87 ; CHECK-NEXT: .long 0x00000000 @ float 0
89 %0 = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %src, i1 1)
93 define arm_aapcs_vfpcc <4 x i32> @ctlz_4i32_1_t(<4 x i32> %src){
94 ; CHECK-LABEL: ctlz_4i32_1_t:
95 ; CHECK: @ %bb.0: @ %entry
96 ; CHECK-NEXT: vclz.i32 q0, q0
99 %0 = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %src, i1 1)
103 define arm_aapcs_vfpcc <8 x i16> @ctlz_8i16_1_t(<8 x i16> %src){
104 ; CHECK-LABEL: ctlz_8i16_1_t:
105 ; CHECK: @ %bb.0: @ %entry
106 ; CHECK-NEXT: vclz.i16 q0, q0
109 %0 = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %src, i1 1)
113 define arm_aapcs_vfpcc <16 x i8> @ctlz_16i8_1_t(<16 x i8> %src){
114 ; CHECK-LABEL: ctlz_16i8_1_t:
115 ; CHECK: @ %bb.0: @ %entry
116 ; CHECK-NEXT: vclz.i8 q0, q0
119 %0 = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %src, i1 1)
124 declare <2 x i64> @llvm.ctlz.v2i64(<2 x i64>, i1)
125 declare <4 x i32> @llvm.ctlz.v4i32(<4 x i32>, i1)
126 declare <8 x i16> @llvm.ctlz.v8i16(<8 x i16>, i1)
127 declare <16 x i8> @llvm.ctlz.v16i8(<16 x i8>, i1)