Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / Analysis / MemorySSA / invalidate.ll
blob80d3504a699701c2cbe937cca03d791e85e196a4
1 ; RUN: opt -aa-pipeline=basic-aa -passes='require<memoryssa>,invalidate<aa>,early-cse<memssa>' \
2 ; RUN:     -debug-pass-manager -disable-output %s 2>&1 \
3 ; RUN:     | FileCheck %s --check-prefix=CHECK-AA-INVALIDATE
4 ; RUN: opt -aa-pipeline=basic-aa -passes='require<memoryssa>,invalidate<domtree>,early-cse<memssa>' \
5 ; RUN:     -debug-pass-manager -disable-output %s 2>&1 \
6 ; RUN:     | FileCheck %s --check-prefix=CHECK-DT-INVALIDATE
8 ; CHECK-AA-INVALIDATE: Running analysis: MemorySSAAnalysis
9 ; CHECK-AA-INVALIDATE: Running analysis: DominatorTreeAnalysis
10 ; CHECK-AA-INVALIDATE: Running analysis: AAManager
11 ; CHECK-AA-INVALIDATE: Running analysis: BasicAA
12 ; CHECK-AA-INVALIDATE: Running pass: InvalidateAnalysisPass<{{.*}}AAManager
13 ; CHECK-AA-INVALIDATE: Invalidating analysis: AAManager
14 ; CHECK-AA-INVALIDATE: Invalidating analysis: MemorySSAAnalysis
15 ; CHECK-AA-INVALIDATE: Running pass: EarlyCSEPass
16 ; CHECK-AA-INVALIDATE: Running analysis: MemorySSAAnalysis
17 ; CHECK-AA-INVALIDATE: Running analysis: AAManager
19 ; CHECK-DT-INVALIDATE: Running analysis: MemorySSAAnalysis
20 ; CHECK-DT-INVALIDATE: Running analysis: DominatorTreeAnalysis
21 ; CHECK-DT-INVALIDATE: Running analysis: AAManager
22 ; CHECK-DT-INVALIDATE: Running analysis: BasicAA
23 ; CHECK-DT-INVALIDATE: Running pass: InvalidateAnalysisPass<{{.*}}DominatorTreeAnalysis
24 ; CHECK-DT-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis
25 ; CHECK-DT-INVALIDATE: Invalidating analysis: BasicAA
26 ; CHECK-DT-INVALIDATE: Invalidating analysis: AAManager
27 ; CHECK-DT-INVALIDATE: Invalidating analysis: MemorySSAAnalysis
28 ; CHECK-DT-INVALIDATE: Running pass: EarlyCSEPass
29 ; CHECK-DT-INVALIDATE: Running analysis: DominatorTreeAnalysis
30 ; CHECK-DT-INVALIDATE: Running analysis: MemorySSAAnalysis
31 ; CHECK-DT-INVALIDATE: Running analysis: AAManager
32 ; CHECK-DT-INVALIDATE: Running analysis: BasicAA
35 ; Function Attrs: ssp uwtable
36 define i32 @main() {
37 entry:
38   %call = call noalias ptr @_Znwm(i64 4)
39   %call1 = call noalias ptr @_Znwm(i64 4)
40   store i32 5, ptr %call, align 4
41   store i32 7, ptr %call1, align 4
42   %0 = load i32, ptr %call, align 4
43   %1 = load i32, ptr %call1, align 4
44   %2 = load i32, ptr %call, align 4
45   %3 = load i32, ptr %call1, align 4
46   %add = add nsw i32 %1, %3
47   ret i32 %add
50 declare noalias ptr @_Znwm(i64)