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.fp,+fp64 -verify-machineinstrs -o - %s | FileCheck %s
4 define arm_aapcs_vfpcc <4 x float> @foo_v4i16(ptr nocapture readonly %pSrc, <4 x i16> %a) {
5 ; CHECK-LABEL: foo_v4i16:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vmovlb.s16 q0, q0
8 ; CHECK-NEXT: vpt.s32 lt, q0, zr
9 ; CHECK-NEXT: vldrht.u32 q0, [r0]
10 ; CHECK-NEXT: vcvt.f32.u32 q0, q0
13 %active.lane.mask = icmp slt <4 x i16> %a, zeroinitializer
14 %wide.masked.load = call <4 x i16> @llvm.masked.load.v4i16.p0(ptr %pSrc, i32 2, <4 x i1> %active.lane.mask, <4 x i16> undef)
15 %0 = uitofp <4 x i16> %wide.masked.load to <4 x float>
19 define arm_aapcs_vfpcc <8 x half> @foo_v8i8(ptr nocapture readonly %pSrc, i32 %blockSize, <8 x i8> %a) {
20 ; CHECK-LABEL: foo_v8i8:
21 ; CHECK: @ %bb.0: @ %entry
22 ; CHECK-NEXT: vmovlb.s8 q0, q0
23 ; CHECK-NEXT: vpt.s16 lt, q0, zr
24 ; CHECK-NEXT: vldrbt.u16 q0, [r0]
25 ; CHECK-NEXT: vcvt.f16.u16 q0, q0
28 %active.lane.mask = icmp slt <8 x i8> %a, zeroinitializer
29 %wide.masked.load = call <8 x i8> @llvm.masked.load.v8i8.p0(ptr %pSrc, i32 1, <8 x i1> %active.lane.mask, <8 x i8> undef)
30 %0 = uitofp <8 x i8> %wide.masked.load to <8 x half>
34 define arm_aapcs_vfpcc <4 x float> @foo_v4i8(ptr nocapture readonly %pSrc, i32 %blockSize, <4 x i8> %a) {
35 ; CHECK-LABEL: foo_v4i8:
36 ; CHECK: @ %bb.0: @ %entry
37 ; CHECK-NEXT: vmovlb.s8 q0, q0
38 ; CHECK-NEXT: vmovlb.s16 q0, q0
39 ; CHECK-NEXT: vpt.s32 lt, q0, zr
40 ; CHECK-NEXT: vldrbt.u32 q0, [r0]
41 ; CHECK-NEXT: vcvt.f32.u32 q0, q0
44 %active.lane.mask = icmp slt <4 x i8> %a, zeroinitializer
45 %wide.masked.load = call <4 x i8> @llvm.masked.load.v4i8.p0(ptr %pSrc, i32 1, <4 x i1> %active.lane.mask, <4 x i8> undef)
46 %0 = uitofp <4 x i8> %wide.masked.load to <4 x float>
50 define arm_aapcs_vfpcc <4 x double> @foo_v4i32(ptr nocapture readonly %pSrc, i32 %blockSize, <4 x i32> %a) {
51 ; CHECK-LABEL: foo_v4i32:
52 ; CHECK: @ %bb.0: @ %entry
53 ; CHECK-NEXT: .save {r4, r5, r7, lr}
54 ; CHECK-NEXT: push {r4, r5, r7, lr}
55 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13}
56 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13}
57 ; CHECK-NEXT: vmov.i64 q5, #0xffffffff
58 ; CHECK-NEXT: vpt.s32 lt, q0, zr
59 ; CHECK-NEXT: vldrwt.u32 q4, [r0]
60 ; CHECK-NEXT: vmov.f32 s0, s16
61 ; CHECK-NEXT: vmov.f32 s2, s17
62 ; CHECK-NEXT: vand q6, q0, q5
63 ; CHECK-NEXT: vmov r0, r1, d13
64 ; CHECK-NEXT: bl __aeabi_ul2d
65 ; CHECK-NEXT: vmov r2, r3, d12
66 ; CHECK-NEXT: vmov.f32 s0, s18
67 ; CHECK-NEXT: vmov.f32 s2, s19
68 ; CHECK-NEXT: vmov d9, r0, r1
69 ; CHECK-NEXT: vand q5, q0, q5
70 ; CHECK-NEXT: vmov r4, r5, d11
71 ; CHECK-NEXT: mov r0, r2
72 ; CHECK-NEXT: mov r1, r3
73 ; CHECK-NEXT: bl __aeabi_ul2d
74 ; CHECK-NEXT: vmov d8, r0, r1
75 ; CHECK-NEXT: mov r0, r4
76 ; CHECK-NEXT: mov r1, r5
77 ; CHECK-NEXT: bl __aeabi_ul2d
78 ; CHECK-NEXT: vmov r2, r3, d10
79 ; CHECK-NEXT: vmov d11, r0, r1
80 ; CHECK-NEXT: mov r0, r2
81 ; CHECK-NEXT: mov r1, r3
82 ; CHECK-NEXT: bl __aeabi_ul2d
83 ; CHECK-NEXT: vmov d10, r0, r1
84 ; CHECK-NEXT: vmov q0, q4
85 ; CHECK-NEXT: vmov q1, q5
86 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13}
87 ; CHECK-NEXT: pop {r4, r5, r7, pc}
89 %active.lane.mask = icmp slt <4 x i32> %a, zeroinitializer
90 %wide.masked.load = call <4 x i32> @llvm.masked.load.v4i32.p0(ptr %pSrc, i32 4, <4 x i1> %active.lane.mask, <4 x i32> undef)
91 %0 = uitofp <4 x i32> %wide.masked.load to <4 x double>
95 declare <4 x i16> @llvm.masked.load.v4i16.p0(ptr, i32 immarg, <4 x i1>, <4 x i16>)
97 declare <8 x i8> @llvm.masked.load.v8i8.p0(ptr, i32 immarg, <8 x i1>, <8 x i8>)
99 declare <4 x i8> @llvm.masked.load.v4i8.p0(ptr, i32 immarg, <4 x i1>, <4 x i8>)
101 declare <4 x i32> @llvm.masked.load.v4i32.p0(ptr, i32 immarg, <4 x i1>, <4 x i32>)