1 ; RUN: opt -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOLIMIT
2 ; RUN: opt -memssa-check-limit=0 -aa-pipeline=basic-aa -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,LIMIT
4 ; Function Attrs: ssp uwtable
7 ; CHECK: 1 = MemoryDef(liveOnEntry)
8 ; CHECK-NEXT: %call = call noalias ptr @_Znwm(i64 4)
9 %call = call noalias ptr @_Znwm(i64 4)
10 ; CHECK: 2 = MemoryDef(1)
11 ; CHECK-NEXT: %call1 = call noalias ptr @_Znwm(i64 4)
12 %call1 = call noalias ptr @_Znwm(i64 4)
13 ; CHECK: 3 = MemoryDef(2)
14 ; CHECK-NEXT: store i32 5, ptr %call, align 4
15 store i32 5, ptr %call, align 4
16 ; CHECK: 4 = MemoryDef(3)
17 ; CHECK-NEXT: store i32 7, ptr %call1, align 4
18 store i32 7, ptr %call1, align 4
19 ; NOLIMIT: MemoryUse(3)
20 ; NOLIMIT-NEXT: %0 = load i32, ptr %call, align 4
22 ; LIMIT-NEXT: %0 = load i32, ptr %call, align 4
23 %0 = load i32, ptr %call, align 4
24 ; NOLIMIT: MemoryUse(4)
25 ; NOLIMIT-NEXT: %1 = load i32, ptr %call1, align 4
27 ; LIMIT-NEXT: %1 = load i32, ptr %call1, align 4
28 %1 = load i32, ptr %call1, align 4
29 ; NOLIMIT: MemoryUse(3)
30 ; NOLIMIT-NEXT: %2 = load i32, ptr %call, align 4
32 ; LIMIT-NEXT: %2 = load i32, ptr %call, align 4
33 %2 = load i32, ptr %call, align 4
34 ; NOLIMIT: MemoryUse(4)
35 ; NOLIMIT-NEXT: %3 = load i32, ptr %call1, align 4
37 ; LIMIT-NEXT: %3 = load i32, ptr %call1, align 4
38 %3 = load i32, ptr %call1, align 4
39 %add = add nsw i32 %1, %3
44 declare noalias ptr @_Znwm(i64)