summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-06-10 23:39:36 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-06-10 23:39:36 +0000
commit25255cbe0000abd64194e9e34098243cd689fd47 (patch)
tree3834e59083a4d2d56f5bb8ff54256f8107f881b0 /test/CodeGen/X86
parentb3e009a165a423536acfa5861c12ef631239d9e4 (diff)
downloadllvm-25255cbe0000abd64194e9e34098243cd689fd47.tar.gz
llvm-25255cbe0000abd64194e9e34098243cd689fd47.tar.bz2
llvm-25255cbe0000abd64194e9e34098243cd689fd47.tar.xz
Add full x86 fast-isel support for memcpy and memset.
rdar://9431466 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r--test/CodeGen/X86/fast-isel-call.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/X86/fast-isel-call.ll b/test/CodeGen/X86/fast-isel-call.ll
index 7e57965bb5..2fbe4e27bf 100644
--- a/test/CodeGen/X86/fast-isel-call.ll
+++ b/test/CodeGen/X86/fast-isel-call.ll
@@ -29,3 +29,27 @@ define void @test2(%struct.s* %d) nounwind {
; CHECK: movl 8(%eax)
; CHECK: movl {{.*}}, 8(%esp)
}
+
+declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
+
+define void @test3(i8* %a) {
+ call void @llvm.memset.p0i8.i32(i8* %a, i8 0, i32 100, i32 1, i1 false)
+ ret void
+; CHECK: test3:
+; CHECK: movl {{.*}}, (%esp)
+; CHECK: movl $0, 4(%esp)
+; CHECK: movl $100, 8(%esp)
+; CHECK: calll {{.*}}memset
+}
+
+declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
+
+define void @test4(i8* %a, i8* %b) {
+ call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %b, i32 100, i32 1, i1 false)
+ ret void
+; CHECK: test4:
+; CHECK: movl {{.*}}, (%esp)
+; CHECK: movl {{.*}}, 4(%esp)
+; CHECK: movl $100, 8(%esp)
+; CHECK: calll {{.*}}memcpy
+}