2011-06-16 03:49:31 +02:00
|
|
|
; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s
|
2012-02-21 21:46:00 +01:00
|
|
|
; RUN: llc < %s -mtriple=thumbv7m-darwin-eabi -o - | FileCheck %s --check-prefix=DARWIN
|
2011-05-22 23:41:23 +02: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 18:57:23 +01:00
|
|
|
|
2008-02-17 21:02:20 +01:00
|
|
|
define void @f() {
|
2006-12-05 18:57:23 +01:00
|
|
|
entry:
|
2011-05-22 23:41:23 +02:00
|
|
|
|
|
|
|
; CHECK: memmove
|
|
|
|
; EABI: __aeabi_memmove
|
2011-06-18 08:05:24 +02: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 23:41:23 +02:00
|
|
|
|
|
|
|
; CHECK: memcpy
|
|
|
|
; EABI: __aeabi_memcpy
|
2011-06-18 08:05:24 +02: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 23:41:23 +02:00
|
|
|
|
|
|
|
; EABI memset swaps arguments
|
|
|
|
; CHECK: mov r1, #0
|
|
|
|
; CHECK: memset
|
2012-02-21 21:46:00 +01:00
|
|
|
; DARWIN: movs r1, #0
|
|
|
|
; DARWIN: memset
|
2011-05-22 23:41:23 +02:00
|
|
|
; EABI: mov r2, #0
|
|
|
|
; EABI: __aeabi_memset
|
2011-06-18 08:05:24 +02: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 21:02:20 +01:00
|
|
|
unreachable
|
2006-12-05 18:57:23 +01:00
|
|
|
}
|
|
|
|
|
2011-06-18 08:05:24 +02: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
|