mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
[asan] properly instrument memory accesses that have small alignment (smaller than min(8,size)) by making two checks instead of one. This may slowdown some cases, e.g. long long on 32-bit or wide loads produced after loop unrolling. The benefit is higher sencitivity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209508 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -34,7 +34,7 @@ define i32 @test_load(i32* %a) sanitize_address {
|
||||
|
||||
|
||||
entry:
|
||||
%tmp1 = load i32* %a
|
||||
%tmp1 = load i32* %a, align 4
|
||||
ret i32 %tmp1
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ define void @test_store(i32* %a) sanitize_address {
|
||||
;
|
||||
|
||||
entry:
|
||||
store i32 42, i32* %a
|
||||
store i32 42, i32* %a, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
@@ -115,6 +115,18 @@ define void @i40test(i40* %a, i40* %b) nounwind uwtable sanitize_address {
|
||||
; CHECK: __asan_report_store_n{{.*}}, i64 5)
|
||||
; CHECK: ret void
|
||||
|
||||
define void @i64test_align1(i64* %b) nounwind uwtable sanitize_address {
|
||||
entry:
|
||||
store i64 0, i64* %b, align 1
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-LABEL: i64test_align1
|
||||
; CHECK: __asan_report_store_n{{.*}}, i64 8)
|
||||
; CHECK: __asan_report_store_n{{.*}}, i64 8)
|
||||
; CHECK: ret void
|
||||
|
||||
|
||||
define void @i80test(i80* %a, i80* %b) nounwind uwtable sanitize_address {
|
||||
entry:
|
||||
%t = load i80* %a
|
||||
|
||||
Reference in New Issue
Block a user