[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2004-02-12-Memcpy.llx

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 12 11:55:03 PST 2004


Changes in directory llvm/test/Regression/CodeGen/X86:

2004-02-12-Memcpy.llx added (r1.1)

---
Log message:

Test that we get rep movs when calling memcpy


---
Diffs of the changes:  (+24 -0)

Index: llvm/test/Regression/CodeGen/X86/2004-02-12-Memcpy.llx
diff -c /dev/null llvm/test/Regression/CodeGen/X86/2004-02-12-Memcpy.llx:1.1
*** /dev/null	Thu Feb 12 11:53:53 2004
--- llvm/test/Regression/CodeGen/X86/2004-02-12-Memcpy.llx	Thu Feb 12 11:53:43 2004
***************
*** 0 ****
--- 1,24 ----
+ ; RUN: llvm-as < %s | llc -march=x86 | grep movs
+ declare sbyte* %llvm.memcpy(sbyte* %A, sbyte* %B, uint %amt, uint %align)
+ 
+ %A = global [1000 x int] zeroinitializer
+ %B = global [1000 x int] zeroinitializer
+ 
+ 
+ void %main() {
+   ; dword copy
+   call sbyte* %llvm.memcpy(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
+                            sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
+                            uint 4000, uint 4)
+ 
+   ; word copy
+   call sbyte* %llvm.memcpy(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
+                            sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
+                            uint 4000, uint 2)
+ 
+   ; byte copy
+   call sbyte* %llvm.memcpy(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
+                            sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
+                            uint 4000, uint 1)
+   ret void
+ }





More information about the llvm-commits mailing list