summaryrefslogtreecommitdiff
path: root/test/Instrumentation/AddressSanitizer
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-02-14 00:02:35 +0000
committerKostya Serebryany <kcc@google.com>2012-02-14 00:02:35 +0000
commit747c02c768e6babb3bbe572d0891b6148e5d3285 (patch)
tree3e4e24de06891f37cd5d693f50af33695128f992 /test/Instrumentation/AddressSanitizer
parentf6629ab84785ff5e7db4cbb9e2d1cbd4ab3b5d34 (diff)
downloadllvm-747c02c768e6babb3bbe572d0891b6148e5d3285.tar.gz
llvm-747c02c768e6babb3bbe572d0891b6148e5d3285.tar.bz2
llvm-747c02c768e6babb3bbe572d0891b6148e5d3285.tar.xz
[asan] fix asan-vs-gvn.ll test (it did not actually check much before this change)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/AddressSanitizer')
-rw-r--r--test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll21
1 files changed, 17 insertions, 4 deletions
diff --git a/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll b/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
index e7a5713632..c0fe15e9fc 100644
--- a/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
+++ b/test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll
@@ -24,10 +24,17 @@ entry:
; CHECK: @test_widening_bad
; CHECK: __asan_report_load1
; CHECK: __asan_report_load1
-; CHECK-ret i32
+; CHECK-NOT: __asan_report
+; We can not use check for "ret" here because __asan_report_load1 calls live after ret.
+; CHECK: end_test_widening_bad
}
-;; Accessing byets 4 and 5. Ok to widen to i16.
+define void @end_test_widening_bad() {
+ entry:
+ ret void
+}
+
+;; Accessing bytes 4 and 5. Ok to widen to i16.
define i32 @test_widening_ok(i8* %P) nounwind ssp noredzone address_safety {
entry:
@@ -38,6 +45,12 @@ entry:
%add = add nsw i32 %conv, %conv2
ret i32 %add
; CHECK: @test_widening_ok
-; CHECK: __asan_report_load1
-; CHECK-ret i32
+; CHECK: __asan_report_load2
+; CHECK-NOT: __asan_report
+; CHECK: end_test_widening_ok
+}
+
+define void @end_test_widening_ok() {
+ entry:
+ ret void
}