1 ; RUN: opt < %s -aa-pipeline=globals-aa -passes='require<globals-aa>,dse' -S | FileCheck %s
3 @X = internal global i32 4
7 ; CHECK: store i32 0, ptr @X
8 ; CHECK-NEXT: call i32 @func_readonly() #0
9 ; CHECK-NEXT: store i32 1, ptr @X
11 %x = call i32 @func_readonly() #0
19 ; CHECK: call i32 @func_read_argmem_only() #1
20 ; CHECK-NEXT: store i32 3, ptr @X
22 %x = call i32 @func_read_argmem_only() #1
27 declare i32 @func_readonly() #0
28 declare i32 @func_read_argmem_only() #1
30 attributes #0 = { readonly nounwind }
31 attributes #1 = { readonly argmemonly nounwind }