summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/misaligned-memset.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-02-20 12:57:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-02-20 12:57:14 +0000
commitcf099d11218cb6f6c5cce947d6738e347f07fb12 (patch)
treed2b61ce94e654cb01a254d2195259db5f9cc3f3c /test/CodeGen/X86/misaligned-memset.ll
parent49011b52fcba02a6051957b84705159f52fae4e4 (diff)
downloadsrc-test-cf099d11218cb6f6c5cce947d6738e347f07fb12.tar.gz
src-test-cf099d11218cb6f6c5cce947d6738e347f07fb12.zip
Notes
Diffstat (limited to 'test/CodeGen/X86/misaligned-memset.ll')
-rw-r--r--test/CodeGen/X86/misaligned-memset.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/misaligned-memset.ll b/test/CodeGen/X86/misaligned-memset.ll
new file mode 100644
index 0000000000000..21f8bf2bf29ee
--- /dev/null
+++ b/test/CodeGen/X86/misaligned-memset.ll
@@ -0,0 +1,15 @@
+; RUN: llc -mtriple=x86_64-apple-darwin -mcpu=nehalem < %s | FileCheck %s
+
+@a = common global [3 x i64] zeroinitializer, align 16
+
+define i32 @main() nounwind ssp {
+; CHECK: movups
+entry:
+ %retval = alloca i32, align 4
+ store i32 0, i32* %retval
+ call void @llvm.memset.p0i8.i64(i8* bitcast (i64* getelementptr inbounds ([3 x i64]* @a, i32 0, i64 1) to i8*), i8 0, i64 16, i32 1, i1 false)
+ %0 = load i32* %retval
+ ret i32 %0
+}
+
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind