summaryrefslogtreecommitdiff
path: root/test/Instrumentation
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-01-10 22:36:33 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-01-10 22:36:33 +0000
commit03de2a621c2f063294eb3f65ea1136f3acac4e98 (patch)
tree08648f3f1641ad50115506f9e2f6a0784d1e0e52 /test/Instrumentation
parent893a2348785170501904dc64b2627a1cb41643a3 (diff)
downloadllvm-03de2a621c2f063294eb3f65ea1136f3acac4e98.tar.gz
llvm-03de2a621c2f063294eb3f65ea1136f3acac4e98.tar.bz2
llvm-03de2a621c2f063294eb3f65ea1136f3acac4e98.tar.xz
[msan] Change va_start/va_copy shadow memset alignment to 8.
This fixes va_start/va_copy of a va_list field which happens to not be laid out at a 16-byte boundary. Differential Revision: http://llvm-reviews.chandlerc.com/D276 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r--test/Instrumentation/MemorySanitizer/msan_basic.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll
index 20957fb36f..cd90f8836a 100644
--- a/test/Instrumentation/MemorySanitizer/msan_basic.ll
+++ b/test/Instrumentation/MemorySanitizer/msan_basic.ll
@@ -534,3 +534,16 @@ define <8 x i8*> @VectorOfPointers(<8 x i8*>* %p) nounwind uwtable {
; CHECK: load <8 x i8*>*
; CHECK: store <8 x i64> {{.*}} @__msan_retval_tls
; CHECK: ret <8 x i8*>
+
+; Test handling of va_copy.
+
+declare void @llvm.va_copy(i8*, i8*) nounwind
+
+define void @VACopy(i8* %p1, i8* %p2) nounwind uwtable {
+ call void @llvm.va_copy(i8* %p1, i8* %p2) nounwind
+ ret void
+}
+
+; CHECK: @VACopy
+; CHECK: call void @llvm.memset.p0i8.i64({{.*}}, i8 0, i64 24, i32 8, i1 false)
+; CHECK: ret void