[llvm-commits] [llvm] r105227 - /llvm/trunk/test/CodeGen/X86/memcpy.ll

Chris Lattner sabre at nondot.org
Mon May 31 10:27:18 PDT 2010


Author: lattner
Date: Mon May 31 12:27:17 2010
New Revision: 105227

URL: http://llvm.org/viewvc/llvm-project?rev=105227&view=rev
Log:
upgrade and filecheckize this test.

Modified:
    llvm/trunk/test/CodeGen/X86/memcpy.ll

Modified: llvm/trunk/test/CodeGen/X86/memcpy.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/memcpy.ll?rev=105227&r1=105226&r2=105227&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/memcpy.ll (original)
+++ llvm/trunk/test/CodeGen/X86/memcpy.ll Mon May 31 12:27:17 2010
@@ -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
 }
+





More information about the llvm-commits mailing list