|
16 | 16 | ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s -aa-pipeline= 2>&1 \
|
17 | 17 | ; RUN: -passes='loop(no-op-loop,loop-deletion),invalidate<scalar-evolution>,loop(no-op-loop)' \
|
18 | 18 | ; RUN: | FileCheck %s --check-prefix=CHECK-SCEV-INV-AFTER-DELETE
|
| 19 | +; |
| 20 | +; Test that BFI is invalidated after the loop adapter if any of the loop passes |
| 21 | +; invalidated it. |
| 22 | +; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s -aa-pipeline= 2>&1 \ |
| 23 | +; RUN: -O1 | FileCheck %s --check-prefix=CHECK-BFI-INV |
19 | 24 |
|
20 | 25 | define void @no_loops() {
|
21 | 26 | ; CHECK-LOOP-INV: Running pass: LoopSimplifyPass
|
@@ -242,3 +247,28 @@ l0.header:
|
242 | 247 | exit:
|
243 | 248 | ret void
|
244 | 249 | }
|
| 250 | + |
| 251 | +; CHECK-BFI-INV-LABEL: Running analysis: OuterAnalysisManagerProxy<{{.*}}> on loop %l0.header in function simplifiable_loop |
| 252 | +; CHECK-BFI-INV-NEXT: Running pass: LoopInstSimplifyPass on loop %l0.header in function simplifiable_loop |
| 253 | +; CHECK-BFI-INV-NEXT: Running pass: LoopSimplifyCFGPass on loop %l0.header in function simplifiable_loop |
| 254 | +; CHECK-BFI-INV-NEXT: Running pass: LICMPass on loop %l0.header in function simplifiable_loop |
| 255 | +; CHECK-BFI-INV-NEXT: Running pass: LoopRotatePass on loop %l0.header in function simplifiable_loop |
| 256 | +; CHECK-BFI-INV-NEXT: Running pass: LICMPass on loop %l0.header in function simplifiable_loop |
| 257 | +; CHECK-BFI-INV-NEXT: Running pass: SimpleLoopUnswitchPass on loop %l0.header in function simplifiable_loop |
| 258 | +; CHECK-BFI-INV-NEXT: Invalidating analysis: PostDominatorTreeAnalysis on simplifiable_loop |
| 259 | +; CHECK-BFI-INV-NEXT: Invalidating analysis: BranchProbabilityAnalysis on simplifiable_loop |
| 260 | +; CHECK-BFI-INV-NEXT: Invalidating analysis: BlockFrequencyAnalysis on simplifiable_loop |
| 261 | +; CHECK-BFI-INV-NEXT: Running pass: SimplifyCFGPass on simplifiable_loop (5 instructions) |
| 262 | + |
| 263 | +define void @simplifiable_loop(i1 %c) !prof !0 { |
| 264 | +entry: |
| 265 | + br label %l0.header |
| 266 | + |
| 267 | +l0.header: |
| 268 | + br label %l0.latch |
| 269 | + |
| 270 | +l0.latch: |
| 271 | + br i1 %c, label %l0.header, label %l0.latch |
| 272 | +} |
| 273 | + |
| 274 | +!0 = !{!"function_entry_count", i64 1} |
0 commit comments