ARM pop of a single register encodes as post-indexed LDR.
[oota-llvm.git] / test / CodeGen / ARM / memfunc.ll
1 ; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s
2 ; RUN: llc < %s -mtriple=arm-none-eabi -o - | FileCheck --check-prefix=EABI %s
3
4 @from = common global [500 x i32] zeroinitializer, align 4
5 @to = common global [500 x i32] zeroinitializer, align 4
6
7 define void @f() {
8 entry:
9
10         ; CHECK: memmove
11         ; EABI: __aeabi_memmove
12         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)
13
14         ; CHECK: memcpy
15         ; EABI: __aeabi_memcpy
16         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)
17
18         ; EABI memset swaps arguments
19         ; CHECK: mov r1, #0
20         ; CHECK: memset
21         ; EABI: mov r2, #0
22         ; EABI: __aeabi_memset
23         call void @llvm.memset.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0, i1 false)
24         unreachable
25 }
26
27 declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
28 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
29 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind