1 ; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s 2 ; RUN: llc < %s -mtriple=thumbv7m-none-macho -o - | FileCheck %s --check-prefix=DARWIN 3 ; RUN: llc < %s -mtriple=arm-none-eabi -o - | FileCheck --check-prefix=EABI %s 4 ; RUN: llc < %s -mtriple=arm-none-eabihf -o - | FileCheck --check-prefix=EABI %s 5 6 @from = common global [500 x i32] zeroinitializer, align 4 7 @to = common global [500 x i32] zeroinitializer, align 4 8 9 define void @f() { 10 entry: 11 12 ; CHECK: memmove 13 ; EABI: __aeabi_memmove 14 call void @llvm.memmove.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false) 15 16 ; CHECK: memcpy 17 ; EABI: __aeabi_memcpy 18 call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false) 19 20 ; EABI memset swaps arguments 21 ; CHECK: mov r1, #0 22 ; CHECK: memset 23 ; DARWIN: movs r1, #0 24 ; DARWIN: memset 25 ; EABI: mov r2, #0 26 ; EABI: __aeabi_memset 27 call void @llvm.memset.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0, i1 false) 28 unreachable 29 } 30 31 declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind 32 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind 33 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind 34