1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; Test that the old outlined check is used with old API levels.
4 ; RUN: opt < %s -passes=hwasan -S | FileCheck %s
6 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
7 target triple = "aarch64--linux-android"
9 define i8 @test_load8(ptr %a) sanitize_hwaddress {
10 ; CHECK-LABEL: define i8 @test_load8
11 ; CHECK-SAME: (ptr [[A:%.*]]) #[[ATTR0:[0-9]+]] {
12 ; CHECK-NEXT: [[DOTHWASAN_SHADOW:%.*]] = call ptr asm "", "=r,0"(ptr @__hwasan_shadow)
13 ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 0)
14 ; CHECK-NEXT: [[B:%.*]] = load i8, ptr [[A]], align 4
15 ; CHECK-NEXT: ret i8 [[B]]
17 %b = load i8, ptr %a, align 4