1 ; RUN: llc < %s -mtriple=mipsel -mcpu=mips32 -O0 -relocation-model=pic \
2 ; RUN: -fast-isel-abort=3 -verify-machineinstrs | FileCheck %s
3 ; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r2 -O0 -relocation-model=pic \
4 ; RUN: -fast-isel-abort=3 -verify-machineinstrs | FileCheck %s
6 @str = private unnamed_addr constant [12 x i8] c"hello there\00", align 1
7 @src = global ptr @str, align 4
8 @i = global i32 12, align 4
9 @dest = common global [50 x i8] zeroinitializer, align 1
11 declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture readonly, i32, i1)
12 declare void @llvm.memmove.p0.p0.i32(ptr nocapture, ptr nocapture readonly, i32, i1)
13 declare void @llvm.memset.p0.i32(ptr nocapture, i8, i32, i1)
15 define void @cpy(ptr %src, i32 %i) {
18 ; CHECK: lw $[[T0:[0-9]+]], %got(dest)(${{[0-9]+}})
19 ; CHECK: lw $[[T2:[0-9]+]], %got(memcpy)(${{[0-9]+}})
22 ; CHECK-NOT: {{.*}}$2{{.*}}
23 call void @llvm.memcpy.p0.p0.i32(ptr @dest, ptr %src, i32 %i, i1 false)
27 define void @mov(ptr %src, i32 %i) {
30 ; CHECK: lw $[[T0:[0-9]+]], %got(dest)(${{[0-9]+}})
31 ; CHECK: lw $[[T2:[0-9]+]], %got(memmove)(${{[0-9]+}})
34 ; CHECK-NOT: {{.*}}$2{{.*}}
35 call void @llvm.memmove.p0.p0.i32(ptr @dest, ptr %src, i32 %i, i1 false)
39 define void @clear(i32 %i) {
42 ; CHECK: lw $[[T0:[0-9]+]], %got(dest)(${{[0-9]+}})
43 ; CHECK: lw $[[T2:[0-9]+]], %got(memset)(${{[0-9]+}})
46 ; CHECK-NOT: {{.*}}$2{{.*}}
47 call void @llvm.memset.p0.i32(ptr @dest, i8 42, i32 %i, i1 false)