2011-06-16 01:49:31 +00:00
|
|
|
; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s
|
2011-05-22 21:41:23 +00:00
|
|
|
; RUN: llc < %s -mtriple=arm-none-eabi -o - | FileCheck --check-prefix=EABI %s
|
|
|
|
|
|
|
|
@from = common global [500 x i32] zeroinitializer, align 4
|
|
|
|
@to = common global [500 x i32] zeroinitializer, align 4
|
2006-12-05 17:57:23 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define void @f() {
|
2006-12-05 17:57:23 +00:00
|
|
|
entry:
|
2011-05-22 21:41:23 +00:00
|
|
|
|
|
|
|
; CHECK: memmove
|
|
|
|
; EABI: __aeabi_memmove
|
|
|
|
call void @llvm.memmove.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 )
|
|
|
|
|
|
|
|
; CHECK: memcpy
|
|
|
|
; EABI: __aeabi_memcpy
|
|
|
|
call void @llvm.memcpy.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 )
|
|
|
|
|
|
|
|
; EABI memset swaps arguments
|
|
|
|
; CHECK: mov r1, #0
|
|
|
|
; CHECK: memset
|
|
|
|
; EABI: mov r2, #0
|
|
|
|
; EABI: __aeabi_memset
|
|
|
|
call void @llvm.memset.i32( i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0 )
|
2008-02-17 20:02:20 +00:00
|
|
|
unreachable
|
2006-12-05 17:57:23 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
|
|
|
|
|
|
|
|
declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
|
|
|
|
|
|
|
|
declare void @llvm.memset.i32(i8*, i8, i32, i32)
|
|
|
|
|