brintos

brintos / llvm-project-archived public Read only

0
0
Text · 841 B · 9b71f60 Raw
27 lines · plain
1; RUN: opt < %s -passes=asan -S | FileCheck %s2target triple = "amdgcn-amd-amdhsa"3 4; Memory access to lds are not instrumented5 6@count = addrspace(3) global [100 x i32] undef, align 167 8define protected amdgpu_kernel void @lds_store(i32 %i) sanitize_address {9entry:10  ; CHECK-LABEL: @lds_store(11  ; CHECK-NOT: call {{[a-zA-Z]}}12  %arrayidx1 = getelementptr inbounds [100 x i32], ptr addrspace(3) @count, i32 0, i32 %i13  store i32 0, ptr addrspace(3) %arrayidx1, align 414  ret void15}16 17define protected amdgpu_kernel void @lds_load(i32 %i) sanitize_address {18entry:19  ; CHECK-LABEL: @lds_load(20  ; CHECK-NOT: call {{[a-zA-Z]}}21  %arrayidx1 = getelementptr inbounds [100 x i32], ptr addrspace(3) @count, i32 0, i32 %i22  %0 = load i32, ptr addrspace(3) %arrayidx1, align 423  ret void24}25 26; CHECK-LABEL: define internal void @asan.module_ctor()27