1 ; RUN: opt -print-memderefs -analyze -S < %s -enable-new-pm=0 -use-dereferenceable-at-point-semantics=1 | FileCheck %s --check-prefixes=CHECK
2 ; RUN: opt -passes=print-memderefs -S < %s -disable-output -use-dereferenceable-at-point-semantics=1 2>&1 | FileCheck %s --check-prefixes=CHECK
4 target datalayout = "e-i32:32:64"
6 ; For the abstract machine model (before RS4GC), gc managed objects
7 ; conceptually live forever. But there may be non-managed objects which are
9 ; CHECK-LABEL: 'abstract_model'
11 ; CHECK-NOT: %other_ptr
12 ; FIXME: Can infer the gc pointer case
13 define void @abstract_model(i32 addrspace(1)* dereferenceable(8) %gc_ptr,
14 i32* dereferenceable(8) %other_ptr)
15 gc "statepoint-example" {
18 load i32, i32 addrspace(1)* %gc_ptr
19 load i32, i32* %other_ptr
23 ; Can free any object accessible in memory
24 declare void @mayfree()