2011-06-16 01:49:31 +00:00
|
|
|
; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s
|
2012-02-21 20:46:00 +00:00
|
|
|
; RUN: llc < %s -mtriple=thumbv7m-darwin-eabi -o - | FileCheck %s --check-prefix=DARWIN
|
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
|
2011-06-18 06:05:24 +00:00
|
|
|
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)
|
2011-05-22 21:41:23 +00:00
|
|
|
|
|
|
|
; CHECK: memcpy
|
|
|
|
; EABI: __aeabi_memcpy
|
2011-06-18 06:05:24 +00:00
|
|
|
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)
|
2011-05-22 21:41:23 +00:00
|
|
|
|
|
|
|
; EABI memset swaps arguments
|
|
|
|
; CHECK: mov r1, #0
|
|
|
|
; CHECK: memset
|
2012-02-21 20:46:00 +00:00
|
|
|
; DARWIN: movs r1, #0
|
|
|
|
; DARWIN: memset
|
2011-05-22 21:41:23 +00:00
|
|
|
; EABI: mov r2, #0
|
|
|
|
; EABI: __aeabi_memset
|
2011-06-18 06:05:24 +00:00
|
|
|
call void @llvm.memset.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0, i1 false)
|
2008-02-17 20:02:20 +00:00
|
|
|
unreachable
|
2006-12-05 17:57:23 +00:00
|
|
|
}
|
|
|
|
|
2011-06-18 06:05:24 +00:00
|
|
|
declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
|
|
|
|
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
|
|
|
|
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
|