summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-08-14 14:05:50 +0000
committerKostya Serebryany <kcc@google.com>2012-08-14 14:05:50 +0000
commitbf479714f95dc4897c553c3f59855bb5468845af (patch)
tree2c7e78989dbae0f0588d79ffc47f23cc882fd0d3
parentfda7a138f72c18d4a5d524739814f2ca83d42440 (diff)
downloadbcm5719-llvm-bf479714f95dc4897c553c3f59855bb5468845af.tar.gz
bcm5719-llvm-bf479714f95dc4897c553c3f59855bb5468845af.zip
[asan] insert crash basic blocks inline as opposed to inserting them at the end of the function. This doesn't seem to fix or break anything, but is considered to be more friendly to downstream passes (test change)
llvm-svn: 161871
-rw-r--r--llvm/test/Instrumentation/AddressSanitizer/basic.ll18
1 files changed, 8 insertions, 10 deletions
diff --git a/llvm/test/Instrumentation/AddressSanitizer/basic.ll b/llvm/test/Instrumentation/AddressSanitizer/basic.ll
index 294ca8ab756..d1900018706 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/basic.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/basic.ll
@@ -23,15 +23,14 @@ define i32 @test_load(i32* %a) address_safety {
; CHECK: icmp sge i8 %{{.*}}, %[[LOAD_SHADOW]]
; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
;
-; The actual load comes next because ASan adds the crash block
-; to the end of the function.
-; CHECK: %tmp1 = load i32* %a
-; CHECK: ret i32 %tmp1
-
; The crash block reports the error.
; CHECK: call void @__asan_report_load4(i64 %[[LOAD_ADDR]])
; CHECK: unreachable
;
+; The actual load.
+; CHECK: %tmp1 = load i32* %a
+; CHECK: ret i32 %tmp1
+
entry:
@@ -57,15 +56,14 @@ define void @test_store(i32* %a) address_safety {
; CHECK: icmp sge i8 %{{.*}}, %[[STORE_SHADOW]]
; CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
;
-; The actual load comes next because ASan adds the crash block
-; to the end of the function.
-; CHECK: store i32 42, i32* %a
-; CHECK: ret void
-;
; The crash block reports the error.
; CHECK: call void @__asan_report_store4(i64 %[[STORE_ADDR]])
; CHECK: unreachable
;
+; The actual load.
+; CHECK: store i32 42, i32* %a
+; CHECK: ret void
+;
entry:
store i32 42, i32* %a
OpenPOWER on IntegriCloud