llvm.org GIT mirror llvm / acbc9cb
[asan] add llvm-ish test for memset/etc instrumentation git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206747 91177308-0d34-0410-b5e6-96231b3b80d8 Kostya Serebryany 6 years ago
1 changed file(s) with 17 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
138138 ; CHECK-NOT: __asan_report
139139 ; CHECK: ret i32
140140
141 declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
142 declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) nounwind
143 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) nounwind
141144
145 define void @memintr_test(i8* %a, i8* %b) nounwind uwtable sanitize_address {
146 entry:
147 tail call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 100, i32 1, i1 false)
148 tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %a, i8* %b, i64 100, i32 1, i1 false)
149 tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 100, i32 1, i1 false)
150 ret void
151 }
152
153 ; CHECK-LABEL: memintr_test
154 ; CHECK: __asan_memset
155 ; CHECK: __asan_memmove
156 ; CHECK: __asan_memcpy
157 ; CHECK: ret void
158