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