forked from OSchip/llvm-project
64 lines
2.3 KiB
LLVM
64 lines
2.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MVE
|
|
; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve.fp %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MVEFP
|
|
|
|
define arm_aapcs_vfpcc void @vabd_v4f32(<4 x float> %x, <4 x float> %y, <4 x float>* %z) {
|
|
; CHECK-MVE-LABEL: vabd_v4f32
|
|
; CHECK-MVE: @ %bb.0: @ %entry
|
|
; CHECK-MVE-NEXT: .save {r4, r5, r6, r7, lr}
|
|
; CHECK-MVE-NEXT: push {r4, r5, r6, r7, lr}
|
|
; CHECK-MVE-NEXT: .pad #4
|
|
; CHECK-MVE-NEXT: sub sp, #4
|
|
; CHECK-MVE-NEXT: .vsave {d8, d9, d10, d11}
|
|
; CHECK-MVE-NEXT: vpush {d8, d9, d10, d11}
|
|
; CHECK-MVE-NEXT: vmov q4, q1
|
|
; CHECK-MVE-NEXT: vmov q5, q0
|
|
; CHECK-MVE-NEXT: mov r4, r0
|
|
; CHECK-MVE-NEXT: vmov r0, s20
|
|
; CHECK-MVE-NEXT: vmov r1, s16
|
|
; CHECK-MVE-NEXT: bl __aeabi_fsub
|
|
; CHECK-MVE-NEXT: mov r5, r0
|
|
; CHECK-MVE-NEXT: vmov r0, s21
|
|
|
|
; CHECK-MVEFP-LABEL: vabd_v4f32
|
|
; CHECK-MVEFP: @ %bb.0: @ %entry
|
|
; CHECK-MVEFP-NEXT: vabd.f32 q0, q0, q1
|
|
; CHECK-MVEFP-NEXT: vstrw.32 q0, [r0]
|
|
; CHECK-MVEFP-NEXT: bx lr
|
|
entry:
|
|
%0 = fsub <4 x float> %x, %y
|
|
%1 = call <4 x float> @llvm.fabs.v4f32(<4 x float> %0)
|
|
store <4 x float> %1, <4 x float>* %z, align 4
|
|
ret void
|
|
}
|
|
|
|
define arm_aapcs_vfpcc void @vabd_v8f16(<8 x half> %x, <8 x half> %y, <8 x half>* %z) {
|
|
; CHECK-MVE-LABEL: vabd_v8f16
|
|
; CHECK-MVE: @ %bb.0: @ %entry
|
|
; CHECK-MVE-NEXT: .save {r4, r5, r6, lr}
|
|
; CHECK-MVE-NEXT: push {r4, r5, r6, lr}
|
|
; CHECK-MVE-NEXT: .vsave {d8, d9, d10, d11, d12, d13}
|
|
; CHECK-MVE-NEXT: vpush {d8, d9, d10, d11, d12, d13}
|
|
; CHECK-MVE-NEXT: mov r4, r0
|
|
; CHECK-MVE-NEXT: vmov.u16 r0, q1[1]
|
|
; CHECK-MVE-NEXT: vmov q5, q1
|
|
; CHECK-MVE-NEXT: vmov q4, q0
|
|
; CHECK-MVE-NEXT: bl __aeabi_h2f
|
|
; CHECK-MVE-NEXT: mov r5, r0
|
|
; CHECK-MVE-NEXT: vmov.u16 r0, q4[1]
|
|
|
|
; CHECK-MVEFP-LABEL: vabd_v8f16
|
|
; CHECK-MVEFP: @ %bb.0: @ %entry
|
|
; CHECK-MVEFP-NEXT: vabd.f16 q0, q0, q1
|
|
; CHECK-MVEFP-NEXT: vstrw.32 q0, [r0]
|
|
; CHECK-MVEFP-NEXT: bx lr
|
|
entry:
|
|
%0 = fsub <8 x half> %x, %y
|
|
%1 = call <8 x half> @llvm.fabs.v8f16(<8 x half> %0)
|
|
store <8 x half> %1, <8 x half>* %z
|
|
ret void
|
|
}
|
|
|
|
declare <4 x float> @llvm.fabs.v4f32(<4 x float>)
|
|
declare <8 x half> @llvm.fabs.v8f16(<8 x half>)
|