1 ; RUN: opt -S -passes=licm < %s | FileCheck %s --check-prefix=IR-AFTER-TRANSFORM
2 ; RUN: opt -passes='print<scalar-evolution>,loop-mssa(licm),print<scalar-evolution>' -disable-output < %s 2>&1 | FileCheck %s --check-prefix=SCEV-EXPRS
4 declare void @clobber()
6 define void @f_0(ptr %loc) {
7 ; IR-AFTER-TRANSFORM-LABEL: @f_0(
8 ; IR-AFTER-TRANSFORM: loop.outer:
9 ; IR-AFTER-TRANSFORM-NEXT: call void @clobber()
10 ; IR-AFTER-TRANSFORM-NEXT: %cond = load i1, ptr %loc
11 ; IR-AFTER-TRANSFORM-NEXT: br label %loop.inner
13 ; SCEV-EXPRS: Classifying expressions for: @f_0
14 ; SCEV-EXPRS: Classifying expressions for: @f_0
15 ; SCEV-EXPRS: %cond = load i1, ptr %loc
16 ; SCEV-EXPRS-NEXT: --> {{.*}} LoopDispositions: { %loop.outer: Variant, %loop.inner: Invariant }
26 %cond = load i1, ptr %loc
27 br i1 %cond, label %loop.inner, label %leave.inner