1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc <16 x i8> @abs_v16i8(<16 x i8> %s1) {
5 ; CHECK-LABEL: abs_v16i8:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vabs.s8 q0, q0
10 %0 = icmp slt <16 x i8> %s1, zeroinitializer
11 %1 = sub nsw <16 x i8> zeroinitializer, %s1
12 %2 = select <16 x i1> %0, <16 x i8> %1, <16 x i8> %s1
16 define arm_aapcs_vfpcc <8 x i16> @abs_v8i16(<8 x i16> %s1) {
17 ; CHECK-LABEL: abs_v8i16:
18 ; CHECK: @ %bb.0: @ %entry
19 ; CHECK-NEXT: vabs.s16 q0, q0
22 %0 = icmp slt <8 x i16> %s1, zeroinitializer
23 %1 = sub nsw <8 x i16> zeroinitializer, %s1
24 %2 = select <8 x i1> %0, <8 x i16> %1, <8 x i16> %s1
28 define arm_aapcs_vfpcc <4 x i32> @abs_v4i32(<4 x i32> %s1) {
29 ; CHECK-LABEL: abs_v4i32:
30 ; CHECK: @ %bb.0: @ %entry
31 ; CHECK-NEXT: vabs.s32 q0, q0
34 %0 = icmp slt <4 x i32> %s1, zeroinitializer
35 %1 = sub nsw <4 x i32> zeroinitializer, %s1
36 %2 = select <4 x i1> %0, <4 x i32> %1, <4 x i32> %s1
40 define arm_aapcs_vfpcc <2 x i64> @abs_v2i64(<2 x i64> %s1) {
41 ; CHECK-LABEL: abs_v2i64:
42 ; CHECK: @ %bb.0: @ %entry
43 ; CHECK-NEXT: .save {r4, r5, r6, lr}
44 ; CHECK-NEXT: push {r4, r5, r6, lr}
45 ; CHECK-NEXT: vmov r12, s2
46 ; CHECK-NEXT: movs r2, #0
47 ; CHECK-NEXT: vmov r0, s3
48 ; CHECK-NEXT: movs r1, #0
49 ; CHECK-NEXT: vmov r4, s0
50 ; CHECK-NEXT: rsbs.w r3, r12, #0
51 ; CHECK-NEXT: sbc.w lr, r2, r0
52 ; CHECK-NEXT: cmp r0, #0
54 ; CHECK-NEXT: movmi r1, #1
55 ; CHECK-NEXT: cmp r1, #0
57 ; CHECK-NEXT: moveq lr, r0
58 ; CHECK-NEXT: vmov r0, s1
59 ; CHECK-NEXT: rsbs r5, r4, #0
60 ; CHECK-NEXT: sbc.w r6, r2, r0
61 ; CHECK-NEXT: cmp r0, #0
63 ; CHECK-NEXT: movmi r2, #1
64 ; CHECK-NEXT: cmp r2, #0
66 ; CHECK-NEXT: moveq r6, r0
67 ; CHECK-NEXT: moveq r5, r4
68 ; CHECK-NEXT: vmov.32 q0[0], r5
69 ; CHECK-NEXT: vmov.32 q0[1], r6
70 ; CHECK-NEXT: cmp r1, #0
72 ; CHECK-NEXT: moveq r3, r12
73 ; CHECK-NEXT: vmov.32 q0[2], r3
74 ; CHECK-NEXT: vmov.32 q0[3], lr
75 ; CHECK-NEXT: pop {r4, r5, r6, pc}
77 %0 = icmp slt <2 x i64> %s1, zeroinitializer
78 %1 = sub nsw <2 x i64> zeroinitializer, %s1
79 %2 = select <2 x i1> %0, <2 x i64> %1, <2 x i64> %s1