diff --git a/llvm/test/CodeGen/AArch64/memcpy-f128.ll b/llvm/test/CodeGen/AArch64/memcpy-f128.ll index 5b354dd23e01d..bb411a749bceb 100644 --- a/llvm/test/CodeGen/AArch64/memcpy-f128.ll +++ b/llvm/test/CodeGen/AArch64/memcpy-f128.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s +; RUN: llc < %s -mtriple=aarch64-linux-gnu -mattr=-neon | FileCheck %s %structA = type { i128 } @stubA = internal unnamed_addr constant %structA zeroinitializer, align 8 diff --git a/llvm/test/CodeGen/ARM/memcpy-inline.ll b/llvm/test/CodeGen/ARM/memcpy-inline.ll index 596a58afe46e5..89db22d1f0ed5 100644 --- a/llvm/test/CodeGen/ARM/memcpy-inline.ll +++ b/llvm/test/CodeGen/ARM/memcpy-inline.ll @@ -12,6 +12,7 @@ @.str4 = private unnamed_addr constant [18 x i8] c"DHRYSTONE PROGR \00", align 1 @.str5 = private unnamed_addr constant [7 x i8] c"DHRYST\00", align 1 @.str6 = private unnamed_addr constant [14 x i8] c"/tmp/rmXXXXXX\00", align 1 +@empty = private unnamed_addr constant [31 x i8] zeroinitializer, align 1 @spool.splbuf = internal global [512 x i8] zeroinitializer, align 16 define i32 @t0() { @@ -282,5 +283,31 @@ entry: ret void } +define void @copy_from_zero_constant(ptr nocapture %C) nounwind { +; CHECK-LABEL: copy_from_zero_constant: +; CHECK: @ %bb.0: @ %entry +; CHECK-NEXT: vmov.i32 q8, #0x0 +; CHECK-NEXT: movs r1, #15 +; CHECK-NEXT: vst1.8 {d16, d17}, [r0], r1 +; CHECK-NEXT: vst1.8 {d16, d17}, [r0] +; CHECK-NEXT: bx lr +; +; CHECK-T1-LABEL: copy_from_zero_constant: +; CHECK-T1: @ %bb.0: @ %entry +; CHECK-T1-NEXT: .save {r7, lr} +; CHECK-T1-NEXT: push {r7, lr} +; CHECK-T1-NEXT: ldr r1, .LCPI8_0 +; CHECK-T1-NEXT: movs r2, #31 +; CHECK-T1-NEXT: bl __aeabi_memcpy +; CHECK-T1-NEXT: pop {r7, pc} +; CHECK-T1-NEXT: .p2align 2 +; CHECK-T1-NEXT: @ %bb.1: +; CHECK-T1-NEXT: .LCPI8_0: +; CHECK-T1-NEXT: .long .Lempty +entry: + tail call void @llvm.memcpy.p0.p0.i64(ptr %C, ptr @empty, i64 31, i1 false) + ret void +} + declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind