1 ; RUN: opt -S -loop-simplifycfg < %s | FileCheck %s
2 ; RUN: opt -S -passes='require<domtree>,loop(simplify-cfg)' < %s | FileCheck %s
3 ; RUN: opt -S -loop-simplifycfg -enable-mssa-loop-dependency=true -verify-memoryssa < %s | FileCheck %s
7 ; CHECK-NEXT: br label %[[LOOP:[a-z]+]]
12 define i32 @foo(i32* %P, i64* %Q) {
16 outer: ; preds = %outer.latch2, %entry
17 %y.2 = phi i32 [ 0, %entry ], [ %y.inc2, %outer.latch2 ]
20 inner: ; preds = %outer
24 %y.inc2 = add nsw i32 %y.2, 1
25 %exitcond.outer = icmp eq i32 %y.inc2, 3
26 store i32 %y.2, i32* %P
27 br i1 %exitcond.outer, label %exit, label %outer.latch2
29 outer.latch2: ; preds = %inner
30 %t = sext i32 %y.inc2 to i64
34 exit: ; preds = %inner