diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-11-29 14:05:53 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-11-29 14:05:53 +0000 |
commit | 3a10b49781afcf0ea445d69dfc6949335269f231 (patch) | |
tree | 61fc37b56598d9a1f0a522983471255584ecb050 /test/Instrumentation | |
parent | af4451b37e381c643144dc00614e63eef8db6082 (diff) | |
download | external_llvm-3a10b49781afcf0ea445d69dfc6949335269f231.zip external_llvm-3a10b49781afcf0ea445d69dfc6949335269f231.tar.gz external_llvm-3a10b49781afcf0ea445d69dfc6949335269f231.tar.bz2 |
[msan] Fix shadow & origin store & load alignment.
This change ensures that shadow memory accesses have the same alignment
as corresponding app memory accesses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r-- | test/Instrumentation/MemorySanitizer/msan_basic.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/msan_basic.ll b/test/Instrumentation/MemorySanitizer/msan_basic.ll index 37d4abc..2346d75 100644 --- a/test/Instrumentation/MemorySanitizer/msan_basic.ll +++ b/test/Instrumentation/MemorySanitizer/msan_basic.ll @@ -233,3 +233,28 @@ entry: ; CHECK: udiv ; CHECK-NOT: icmp ; CHECK: } + + +; Check that loads from shadow have the same aligment as the original loads. + +define i32 @ShadowLoadAlignmentLarge() nounwind uwtable { + %y = alloca i32, align 64 + %1 = load volatile i32* %y, align 64 + ret i32 %1 +} + +; CHECK: define i32 @ShadowLoadAlignmentLarge +; CHECK: load i32* {{.*}} align 64 +; CHECK: load volatile i32* {{.*}} align 64 +; CHECK: } + +define i32 @ShadowLoadAlignmentSmall() nounwind uwtable { + %y = alloca i32, align 2 + %1 = load volatile i32* %y, align 2 + ret i32 %1 +} + +; CHECK: define i32 @ShadowLoadAlignmentSmall +; CHECK: load i32* {{.*}} align 2 +; CHECK: load volatile i32* {{.*}} align 2 +; CHECK: } |