1 ; RUN: opt < %s -passes=asan -S -mtriple=aarch64-linux-gnu | FileCheck --check-prefix=CHECK-AARCH64LE %s
2 ; RUN: opt < %s -passes=asan -S -mtriple=aarch64_be-linux-gnu | FileCheck --check-prefix=CHECK-AARCH64BE %s
3 ; REQUIRES: aarch64-registered-target
5 define i32 @read_4_bytes(ptr %a) sanitize_address {
7 %tmp1 = load i32, ptr %a, align 4
11 ; CHECK-AARCH64LE: @read_4_bytes
12 ; CHECK-AARCH64LE-NOT: ret
13 ; Check for ASAN's Offset for AArch64 LE (1 << 36 or 68719476736)
14 ; CHECK-AARCH64LE: lshr {{.*}} 3
15 ; CHECK-AARCH64Le-NEXT: {{68719476736}}
16 ; CHECK-AARCH64LE: ret
18 ; CHECK-AARCH64BE: @read_4_bytes
19 ; CHECK-AARCH64BE-NOT: ret
20 ; Check for ASAN's Offset for AArch64 BE (1 << 36 or 68719476736)
21 ; CHECK-AARCH64BE: lshr {{.*}} 3
22 ; CHECK-AARCH64BE-NEXT: {{68719476736}}
23 ; CHECK-AARCH64BE: ret