| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 |
; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s |
| 3 |
|
| 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 |
| 8 |
; CHECK-NEXT: bx lr |
| 9 |
entry: |
| 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 |
| 13 |
ret <16 x i8> %2 |
| 14 |
} |
| 15 |
|
| 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 |
| 20 |
; CHECK-NEXT: bx lr |
| 21 |
entry: |
| 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 |
| 25 |
ret <8 x i16> %2 |
| 26 |
} |
| 27 |
|
| 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 |
| 32 |
; CHECK-NEXT: bx lr |
| 33 |
entry: |
| 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 |
| 37 |
ret <4 x i32> %2 |
| 38 |
} |
| 39 |
|
| 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: vmov r0, r1, d1 |
| 44 |
; CHECK-NEXT: eor.w r0, r0, r1, asr #31 |
| 45 |
; CHECK-NEXT: eor.w r2, r1, r1, asr #31 |
| 46 |
; CHECK-NEXT: subs.w r0, r0, r1, asr #31 |
| 47 |
; CHECK-NEXT: sbc.w r1, r2, r1, asr #31 |
| 48 |
; CHECK-NEXT: vmov r2, r3, d0 |
| 49 |
; CHECK-NEXT: eor.w r2, r2, r3, asr #31 |
| 50 |
; CHECK-NEXT: subs.w r2, r2, r3, asr #31 |
| 51 |
; CHECK-NEXT: vmov q0[2], q0[0], r2, r0 |
| 52 |
; CHECK-NEXT: eor.w r0, r3, r3, asr #31 |
| 53 |
; CHECK-NEXT: sbc.w r0, r0, r3, asr #31 |
| 54 |
; CHECK-NEXT: vmov q0[3], q0[1], r0, r1 |
| 55 |
; CHECK-NEXT: bx lr |
| 56 |
entry: |
| 57 |
%0 = icmp slt <2 x i64> %s1, zeroinitializer |
| 58 |
%1 = sub nsw <2 x i64> zeroinitializer, %s1 |
| 59 |
%2 = select <2 x i1> %0, <2 x i64> %1, <2 x i64> %s1 |
| 60 |
ret <2 x i64> %2 |
| 61 |
} |