summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-06-13 19:33:32 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-06-13 19:33:32 +0000
commite193b325837bee5f9a848a16077a6e156fe88fba (patch)
treed783c01e8e37709f836a876a1ca7f85d3a955ff4 /test
parent2bd7e532b49cb461f7e16acb01124b56aa169844 (diff)
downloadllvm-e193b325837bee5f9a848a16077a6e156fe88fba.tar.gz
llvm-e193b325837bee5f9a848a16077a6e156fe88fba.tar.bz2
llvm-e193b325837bee5f9a848a16077a6e156fe88fba.tar.xz
Set a higher value for maxStoresPerMemcpy in MipsISelLowering.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158414 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Mips/memcpy.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/memcpy.ll b/test/CodeGen/Mips/memcpy.ll
new file mode 100644
index 0000000000..39764a9363
--- /dev/null
+++ b/test/CodeGen/Mips/memcpy.ll
@@ -0,0 +1,19 @@
+; RUN: llc -march=mipsel < %s | FileCheck %s
+
+%struct.S1 = type { i32, [41 x i8] }
+
+@.str = private unnamed_addr constant [31 x i8] c"abcdefghijklmnopqrstuvwxyzABCD\00", align 1
+
+define void @foo1(%struct.S1* %s1, i8 signext %n) nounwind {
+entry:
+; CHECK-NOT: call16(memcpy
+
+ %arraydecay = getelementptr inbounds %struct.S1* %s1, i32 0, i32 1, i32 0
+ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %arraydecay, i8* getelementptr inbounds ([31 x i8]* @.str, i32 0, i32 0), i32 31, i32 1, i1 false)
+ %arrayidx = getelementptr inbounds %struct.S1* %s1, i32 0, i32 1, i32 40
+ store i8 %n, i8* %arrayidx, align 1
+ ret void
+}
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+