[PATCH] D63827: [ARM] Allow MVE loads and stores of v2f64
Mikhail Maltsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 09:59:01 PDT 2019
miyuki updated this revision to Diff 206704.
miyuki edited the summary of this revision.
miyuki added a comment.
Added a test which uses <2 x double>. Alignment issue should be fixed separately, IMHO.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63827/new/
https://reviews.llvm.org/D63827
Files:
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/mve-basic.ll
Index: llvm/test/CodeGen/Thumb2/mve-basic.ll
===================================================================
--- llvm/test/CodeGen/Thumb2/mve-basic.ll
+++ llvm/test/CodeGen/Thumb2/mve-basic.ll
@@ -29,3 +29,38 @@
store <4 x i32> %result, <4 x i32>* %resultp, align 16
ret void
}
+
+define void @vector_f64_copy(<2 x double>* %from, <2 x double>* %to) {
+; CHECK-LABEL: vector_f64_copy:
+; CHECK: @ %bb.0:
+; CHECK-NEXT: vldrw.u32 q0, [r0]
+; CHECK-NEXT: vstrw.32 q0, [r1]
+; CHECK-NEXT: bx lr
+ %v = load <2 x double>, <2 x double>* %from, align 16
+ store <2 x double> %v, <2 x double>* %to, align 16
+ ret void
+}
+
+define arm_aapcs_vfpcc <16 x i8> @stack_slot_handling(<16 x i8> %a) #0 {
+; CHECK-LABEL: stack_slot_handling:
+; CHECK: @ %bb.0: @ %entry
+; CHECK-NEXT: push {r4, r6, r7, lr}
+; CHECK-NEXT: add r7, sp, #8
+; CHECK-NEXT: sub sp, #16
+; CHECK-NEXT: mov r4, sp
+; CHECK-NEXT: bfc r4, #0, #4
+; CHECK-NEXT: mov sp, r4
+; CHECK-NEXT: mov r0, sp
+; CHECK-NEXT: vstrw.32 q0, [r0]
+; CHECK-NEXT: vldrw.u32 q0, [r0]
+; CHECK-NEXT: sub.w r4, r7, #8
+; CHECK-NEXT: mov sp, r4
+; CHECK-NEXT: pop {r4, r6, r7, pc}
+entry:
+ %a.addr = alloca <16 x i8>, align 8
+ store <16 x i8> %a, <16 x i8>* %a.addr, align 8
+ %0 = load <16 x i8>, <16 x i8>* %a.addr, align 8
+ ret <16 x i8> %0
+}
+
+attributes #0 = { noinline optnone }
Index: llvm/lib/Target/ARM/ARMInstrMVE.td
===================================================================
--- llvm/lib/Target/ARM/ARMInstrMVE.td
+++ llvm/lib/Target/ARM/ARMInstrMVE.td
@@ -4017,6 +4017,7 @@
def : MVE_unpred_vector_store_typed<v4i32, RegImmInst, StoreKind, shift>;
def : MVE_unpred_vector_store_typed<v4f32, RegImmInst, StoreKind, shift>;
def : MVE_unpred_vector_store_typed<v2i64, RegImmInst, StoreKind, shift>;
+ def : MVE_unpred_vector_store_typed<v2f64, RegImmInst, StoreKind, shift>;
}
class MVE_unpred_vector_load_typed<ValueType Ty, Instruction RegImmInst,
@@ -4031,6 +4032,7 @@
def : MVE_unpred_vector_load_typed<v4i32, RegImmInst, LoadKind, shift>;
def : MVE_unpred_vector_load_typed<v4f32, RegImmInst, LoadKind, shift>;
def : MVE_unpred_vector_load_typed<v2i64, RegImmInst, LoadKind, shift>;
+ def : MVE_unpred_vector_load_typed<v2f64, RegImmInst, LoadKind, shift>;
}
let Predicates = [HasMVEInt, IsLE] in {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63827.206704.patch
Type: text/x-patch
Size: 2368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190626/bae5f07a/attachment.bin>
More information about the llvm-commits
mailing list