1 ; Test optimization experiments.
2 ; -asan-force-experiment flag turns all memory accesses into experiments.
3 ; RUN: opt < %s -asan -asan-module -asan-force-experiment=42 -asan-instrumentation-with-call-threshold=0 -S | FileCheck %s
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
5 target triple = "x86_64-unknown-linux-gnu"
7 define void @load1(i8* %p) sanitize_address {
9 %t = load i8, i8* %p, align 1
11 ; CHECK-LABEL: define void @load1
12 ; CHECK: __asan_exp_load1{{.*}} i32 42
16 define void @load2(i16* %p) sanitize_address {
18 %t = load i16, i16* %p, align 2
20 ; CHECK-LABEL: define void @load2
21 ; CHECK: __asan_exp_load2{{.*}} i32 42
25 define void @load4(i32* %p) sanitize_address {
27 %t = load i32, i32* %p, align 4
29 ; CHECK-LABEL: define void @load4
30 ; CHECK: __asan_exp_load4{{.*}} i32 42
34 define void @load8(i64* %p) sanitize_address {
36 %t = load i64, i64* %p, align 8
38 ; CHECK-LABEL: define void @load8
39 ; CHECK: __asan_exp_load8{{.*}} i32 42
43 define void @load16(i128* %p) sanitize_address {
45 %t = load i128, i128* %p, align 16
47 ; CHECK-LABEL: define void @load16
48 ; CHECK: __asan_exp_load16{{.*}} i32 42
52 define void @loadN(i48* %p) sanitize_address {
54 %t = load i48, i48* %p, align 1
56 ; CHECK-LABEL: define void @loadN
57 ; CHECK: __asan_exp_loadN{{.*}} i32 42
61 define void @store1(i8* %p) sanitize_address {
63 store i8 1, i8* %p, align 1
65 ; CHECK-LABEL: define void @store1
66 ; CHECK: __asan_exp_store1{{.*}} i32 42
70 define void @store2(i16* %p) sanitize_address {
72 store i16 1, i16* %p, align 2
74 ; CHECK-LABEL: define void @store2
75 ; CHECK: __asan_exp_store2{{.*}} i32 42
79 define void @store4(i32* %p) sanitize_address {
81 store i32 1, i32* %p, align 4
83 ; CHECK-LABEL: define void @store4
84 ; CHECK: __asan_exp_store4{{.*}} i32 42
88 define void @store8(i64* %p) sanitize_address {
90 store i64 1, i64* %p, align 8
92 ; CHECK-LABEL: define void @store8
93 ; CHECK: __asan_exp_store8{{.*}} i32 42
97 define void @store16(i128* %p) sanitize_address {
99 store i128 1, i128* %p, align 16
101 ; CHECK-LABEL: define void @store16
102 ; CHECK: __asan_exp_store16{{.*}} i32 42
106 define void @storeN(i48* %p) sanitize_address {
108 store i48 1, i48* %p, align 1
110 ; CHECK-LABEL: define void @storeN
111 ; CHECK: __asan_exp_storeN{{.*}} i32 42