summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/darwin-bzero.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-01 20:38:36 +0000
committerDan Gohman <gohman@apple.com>2008-04-01 20:38:36 +0000
commit68d599df37218452acd5a680d5360d3caaa1623c (patch)
tree86b517d4f8bae9d4fc95579d1da720e78cf78270 /test/CodeGen/X86/darwin-bzero.ll
parentb6d5b1439047609c050576f3dc52b722e76bd30b (diff)
downloadllvm-68d599df37218452acd5a680d5360d3caaa1623c.tar.gz
llvm-68d599df37218452acd5a680d5360d3caaa1623c.tar.bz2
llvm-68d599df37218452acd5a680d5360d3caaa1623c.tar.xz
Speculatively micro-optimize memory-zeroing calls on Darwin 10.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/darwin-bzero.ll')
-rw-r--r--test/CodeGen/X86/darwin-bzero.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/darwin-bzero.ll b/test/CodeGen/X86/darwin-bzero.ll
new file mode 100644
index 0000000000..c292140e10
--- /dev/null
+++ b/test/CodeGen/X86/darwin-bzero.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin10 | grep __bzero
+
+declare void @llvm.memset.i32(i8*, i8, i32, i32)
+
+define void @foo(i8* %p, i32 %len) {
+ call void @llvm.memset.i32(i8* %p, i8 0, i32 %len, i32 1);
+ ret void
+}