1 ; RUN: opt -S -passes="loop-vectorize,jump-threading" -debug-pass-manager < %s 2>&1 | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 ; Checks what analyses are invalidated after Loop Vectorization when no actual
6 ; vectorization happens, and the only change LV makes is LCSSA formation.
8 define i32 @novect(i32* %p) {
10 ; CHECK: Running pass: LoopVectorizePass on novect
11 ; CHECK: Clearing all analysis results for: <possibly invalidated loop>
12 ; CHECK: Invalidating analysis: ScalarEvolutionAnalysis on novect
13 ; CHECK-NOT: Invalidating analysis: BranchProbabilityAnalysis on novect
14 ; CHECK-NOT: Invalidating analysis: BlockFrequencyAnalysis on novect
15 ; CHECK: Invalidating analysis: DemandedBitsAnalysis on novect
16 ; CHECK: Running pass: JumpThreadingPass on novect
19 ; CHECK: br label %middle
21 ; CHECK: %iv = phi i32 [ 0, %entry ], [ %iv.next, %middle ]
22 ; CHECK: %x = load volatile i32, i32* %p
23 ; CHECK: %iv.next = add i32 %iv, 1
24 ; CHECK: %cond = icmp slt i32 %iv, 1000
25 ; CHECK: br i1 %cond, label %exit, label %middle
27 ; CHECK: %x.lcssa = phi i32 [ %x, %middle ]
28 ; CHECK: ret i32 %x.lcssa
34 %iv = phi i32 [0, %entry], [%iv.next, %middle]
35 %x = load volatile i32, i32* %p
36 %iv.next = add i32 %iv, 1
37 %cond = icmp slt i32 %iv, 1000
38 br i1 %cond, label %exit, label %middle