1; RUN: opt -S -passes="loop-vectorize,jump-threading" -debug-pass-manager < %s 2>&1 | FileCheck %s 2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 4 5; Checks what analyses are invalidated after Loop Vectorization when no actual 6; vectorization happens, and the only change LV makes is LCSSA formation. 7 8define i32 @novect(i32* %p) { 9 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: Invalidating analysis: MemorySSAAnalysis on novect 17; CHECK: Running pass: JumpThreadingPass on novect 18 19; CHECK: entry: 20; CHECK: br label %middle 21; CHECK: middle: 22; CHECK: %iv = phi i32 [ 0, %entry ], [ %iv.next, %middle ] 23; CHECK: %x = load volatile i32, i32* %p 24; CHECK: %iv.next = add i32 %iv, 1 25; CHECK: %cond = icmp slt i32 %iv, 1000 26; CHECK: br i1 %cond, label %exit, label %middle 27; CHECK: exit: 28; CHECK: %x.lcssa = phi i32 [ %x, %middle ] 29; CHECK: ret i32 %x.lcssa 30 31entry: 32 br label %middle 33 34middle: 35 %iv = phi i32 [0, %entry], [%iv.next, %middle] 36 %x = load volatile i32, i32* %p 37 %iv.next = add i32 %iv, 1 38 %cond = icmp slt i32 %iv, 1000 39 br i1 %cond, label %exit, label %middle 40 41exit: 42 ret i32 %x 43} 44