aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-28 05:28:42 +0000
committerChris Lattner <sabre@nondot.org>2004-02-28 05:28:42 +0000
commit43c4361178465bff33205c7e8c6be7253b75fe4e (patch)
treefa7db1b206eecce6156a0280e8b9cc9c84518d50
parentefd74a0159800d8874aec3b4e3c7353a95ab854e (diff)
new testcase for intrinsic folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11943 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/InstCombine/call-intrinsics.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/call-intrinsics.ll b/test/Transforms/InstCombine/call-intrinsics.ll
new file mode 100644
index 0000000000..07435c4a3b
--- /dev/null
+++ b/test/Transforms/InstCombine/call-intrinsics.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis
+
+declare void %llvm.memmove(sbyte*, sbyte*, uint, uint)
+declare void %llvm.memcpy(sbyte*, sbyte*, uint, uint)
+declare void %llvm.memset(sbyte*, ubyte, uint, uint)
+
+%X = global sbyte 0
+%Y = global sbyte 12
+
+void %zero_byte_test() {
+ ; These process zero bytes, so they are a noop.
+ call void %llvm.memmove(sbyte* %X, sbyte* %Y, uint 0, uint 100)
+ call void %llvm.memcpy(sbyte* %X, sbyte* %Y, uint 0, uint 100)
+ call void %llvm.memset(sbyte* %X, ubyte 123, uint 0, uint 100)
+ ret void
+}
+