summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-01-22 12:30:52 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-01-22 12:30:52 +0000
commitc4415591edb20bf2c0f882db47c0b7f382f859a4 (patch)
tree922691cf40a8c67f0aed160175d1b91bf082b8e3 /llvm/test
parentef68259d269a3a4c22efb4811afbd5157bccb8f1 (diff)
downloadbcm5719-llvm-c4415591edb20bf2c0f882db47c0b7f382f859a4.tar.gz
bcm5719-llvm-c4415591edb20bf2c0f882db47c0b7f382f859a4.zip
[msan] Do not insert check on volatile store.
Volatile bitfields can cause valid stores of uninitialized bits. llvm-svn: 173153
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll b/llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll
index 641a3a26f4e..a3caa809bdc 100644
--- a/llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll
+++ b/llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll
@@ -563,3 +563,17 @@ define void @VACopy(i8* %p1, i8* %p2) nounwind uwtable {
; CHECK: @VACopy
; CHECK: call void @llvm.memset.p0i8.i64({{.*}}, i8 0, i64 24, i32 8, i1 false)
; CHECK: ret void
+
+
+; Test handling of volatile stores.
+; Check that MemorySanitizer does not add a check of the value being stored.
+
+define void @VolatileStore(i32* nocapture %p, i32 %x) nounwind uwtable {
+entry:
+ store volatile i32 %x, i32* %p, align 4
+ ret void
+}
+
+; CHECK: @VolatileStore
+; CHECK-NOT: @__msan_warning
+; CHECK: ret void
OpenPOWER on IntegriCloud