1 ; RUN: llc -mtriple=thumbv7m-arm-none-eabi -mcpu=cortex-m3 < %s | FileCheck %s
3 %struct.mystruct = type { [31 x i8] }
5 @.str = private unnamed_addr constant [31 x i8] c"012345678901234567890123456789\00", align 1
6 @.str.1 = private unnamed_addr constant [21 x i8] c"01234567890123456789\00", align 1
8 @myglobal = common global %struct.mystruct zeroinitializer, align 1
10 define void @foo() #0 {
13 ; CHECK: __aeabi_memcpy
15 %mystring = alloca [31 x i8], align 1
16 %0 = getelementptr inbounds [31 x i8], [31 x i8]* %mystring, i32 0, i32 0
17 call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %0, i8* align 1 getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i32 0, i32 0), i32 31, i1 false)
21 define void @bar() #0 {
24 ; CHECK-NOT: __aeabi_memcpy
25 %mystring = alloca [31 x i8], align 1
26 %0 = getelementptr inbounds [31 x i8], [31 x i8]* %mystring, i32 0, i32 0
27 call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %0, i8* align 1 getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i32 0, i32 0), i32 21, i1 false)
31 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i1) #1
33 attributes #0 = { minsize noinline nounwind optsize }