diff options
| author | Kostya Serebryany <kcc@google.com> | 2014-04-21 11:57:43 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2014-04-21 11:57:43 +0000 |
| commit | 49b88f54dab795bd3b452002dee8836560394379 (patch) | |
| tree | 12b16d4a75651f63523c490409909aa27064c8b9 | |
| parent | 94c81ca8e196e9b43280f0976ee4269c97f3084b (diff) | |
| download | bcm5719-llvm-49b88f54dab795bd3b452002dee8836560394379.tar.gz bcm5719-llvm-49b88f54dab795bd3b452002dee8836560394379.zip | |
[asan] add llvm-ish test for memset/etc instrumentation
llvm-svn: 206747
| -rw-r--r-- | llvm/test/Instrumentation/AddressSanitizer/basic.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/AddressSanitizer/basic.ll b/llvm/test/Instrumentation/AddressSanitizer/basic.ll index 4863a3dea96..7a125a39643 100644 --- a/llvm/test/Instrumentation/AddressSanitizer/basic.ll +++ b/llvm/test/Instrumentation/AddressSanitizer/basic.ll @@ -139,4 +139,21 @@ entry: ; CHECK-NOT: __asan_report ; CHECK: ret i32 +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind +declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) nounwind + +define void @memintr_test(i8* %a, i8* %b) nounwind uwtable sanitize_address { + entry: + tail call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 100, i32 1, i1 false) + tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %a, i8* %b, i64 100, i32 1, i1 false) + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 100, i32 1, i1 false) + ret void +} + +; CHECK-LABEL: memintr_test +; CHECK: __asan_memset +; CHECK: __asan_memmove +; CHECK: __asan_memcpy +; CHECK: ret void |

