aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-05-31 17:27:17 +0000
committerChris Lattner <sabre@nondot.org>2010-05-31 17:27:17 +0000
commit0ece9a12acd166b937fe615a24ee2135d92d66c1 (patch)
tree05c13063769e14260c3ad23792d7ba3dfc830f63 /test/CodeGen
parent6b378618273bab1ee64c5034f4fd8e8338b7110f (diff)
downloadexternal_llvm-0ece9a12acd166b937fe615a24ee2135d92d66c1.zip
external_llvm-0ece9a12acd166b937fe615a24ee2135d92d66c1.tar.gz
external_llvm-0ece9a12acd166b937fe615a24ee2135d92d66c1.tar.bz2
upgrade and filecheckize this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/memcpy.ll22
1 files changed, 16 insertions, 6 deletions
diff --git a/test/CodeGen/X86/memcpy.ll b/test/CodeGen/X86/memcpy.ll
index 5a3ae77..16bf7c5 100644
--- a/test/CodeGen/X86/memcpy.ll
+++ b/test/CodeGen/X86/memcpy.ll
@@ -1,17 +1,27 @@
-; RUN: llc < %s -march=x86-64 | grep call.*memcpy | count 2
+; RUN: llc < %s -march=x86-64 | FileCheck %s
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
-define i8* @my_memcpy(i8* %a, i8* %b, i64 %n) nounwind {
+
+; Variable memcpy's should lower to calls.
+define i8* @test1(i8* %a, i8* %b, i64 %n) nounwind {
entry:
- tail call void @llvm.memcpy.i64( i8* %a, i8* %b, i64 %n, i32 1 )
+ tail call void @llvm.memcpy.p0i8.p0i8.i64( i8* %a, i8* %b, i64 %n, i32 1, i1 0 )
ret i8* %a
+
+; CHECK: test1:
+; CHECK: memcpy
}
-define i8* @my_memcpy2(i64* %a, i64* %b, i64 %n) nounwind {
+; Variable memcpy's should lower to calls.
+define i8* @test2(i64* %a, i64* %b, i64 %n) nounwind {
entry:
%tmp14 = bitcast i64* %a to i8*
%tmp25 = bitcast i64* %b to i8*
- tail call void @llvm.memcpy.i64(i8* %tmp14, i8* %tmp25, i64 %n, i32 8 )
+ tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp14, i8* %tmp25, i64 %n, i32 8, i1 0 )
ret i8* %tmp14
+
+; CHECK: test2:
+; CHECK: memcpy
}
+