diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-01-22 12:30:52 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-01-22 12:30:52 +0000 |
commit | 4247b13252a99b284e1ed396be9755878d42df2a (patch) | |
tree | bf2240db78ef5a16faa0b37ecc0231b19de06c4f /test/Instrumentation | |
parent | 318b2cc86faeec1edd330eabba6cfcaab36e3fac (diff) | |
download | external_llvm-4247b13252a99b284e1ed396be9755878d42df2a.zip external_llvm-4247b13252a99b284e1ed396be9755878d42df2a.tar.gz external_llvm-4247b13252a99b284e1ed396be9755878d42df2a.tar.bz2 |
[msan] Do not insert check on volatile store.
Volatile bitfields can cause valid stores of uninitialized bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r-- | test/Instrumentation/MemorySanitizer/msan_basic.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll index 641a3a2..a3caa80 100644 --- a/test/Instrumentation/MemorySanitizer/msan_basic.ll +++ b/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 |