[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyLibCalls/MemSet.ll
Reid Spencer
reid at x10sys.com
Mon May 2 21:00:37 PDT 2005
Changes in directory llvm/test/Regression/Transforms/SimplifyLibCalls:
MemSet.ll added (r1.1)
---
Log message:
A new test case for the LLVMMemSetOptimization.
---
Diffs of the changes: (+17 -0)
MemSet.ll | 17 +++++++++++++++++
1 files changed, 17 insertions(+)
Index: llvm/test/Regression/Transforms/SimplifyLibCalls/MemSet.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyLibCalls/MemSet.ll:1.1
*** /dev/null Mon May 2 23:00:34 2005
--- llvm/test/Regression/Transforms/SimplifyLibCalls/MemSet.ll Mon May 2 23:00:24 2005
***************
*** 0 ****
--- 1,17 ----
+ ; Test that the LLVMMemSetOptimizer works correctly
+ ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memset'
+
+ declare sbyte* %llvm.memset(sbyte*,ubyte,uint,uint)
+
+ implementation ; Functions:
+
+ int %main () {
+ %target = alloca [1024 x sbyte]
+ %target_p = getelementptr [1024 x sbyte]* %target, int 0, int 0
+ call sbyte* %llvm.memset(sbyte* %target_p, ubyte 1, uint 0, uint 1)
+ call sbyte* %llvm.memset(sbyte* %target_p, ubyte 1, uint 1, uint 1)
+ call sbyte* %llvm.memset(sbyte* %target_p, ubyte 1, uint 2, uint 2)
+ call sbyte* %llvm.memset(sbyte* %target_p, ubyte 1, uint 4, uint 4)
+ call sbyte* %llvm.memset(sbyte* %target_p, ubyte 1, uint 8, uint 8)
+ ret int 0
+ }
More information about the llvm-commits
mailing list