1 ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
2 ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB
4 @message1 = global [60 x i8] c"The LLVM Compiler Infrastructure\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", align 1
5 @temp = common global [60 x i8] zeroinitializer, align 1
7 define void @t1() nounwind ssp {
16 ; THUMB: ldr.n r0, LCPI0_0
24 call void @llvm.memset.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @message1, i32 0, i32 5), i8 64, i32 10, i32 1, i1 false)
28 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
30 define void @t2() nounwind ssp {
32 ; ARM: ldr r0, LCPI1_0
35 ; ARM: add r0, r0, #16
37 ; ARM: str r0, [sp] @ 4-byte Spill
39 ; ARM: ldr r1, [sp] @ 4-byte Reload
42 ; THUMB: ldr.n r0, LCPI1_0
44 ; THUMB: adds r1, r0, #4
50 call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 10, i32 1, i1 false)
54 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
56 define void @t3() nounwind ssp {
58 ; ARM: ldr r0, LCPI2_0
61 ; ARM: add r0, r0, #16
66 ; THUMB: ldr.n r0, LCPI2_0
68 ; THUMB: adds r1, r0, #4
74 call void @llvm.memmove.p0i8.p0i8.i32(i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 4), i8* getelementptr inbounds ([60 x i8]* @temp, i32 0, i32 16), i32 10, i32 1, i1 false)
78 declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind