1 ; Ensure we don't run analyses over loops after they've been deleted. We run
2 ; one version with a no-op loop pass to make sure that the loop doesn't get
5 ; RUN: opt < %s -passes='require<ivusers>,no-op-loop,require<ivusers>' -S \
6 ; RUN: | FileCheck %s --check-prefixes=CHECK,BEFORE
7 ; RUN: opt < %s -passes='require<ivusers>,loop-deletion,require<ivusers>' -S \
8 ; RUN: | FileCheck %s --check-prefixes=CHECK,AFTER
11 define void @foo(i64 %n, i64 %m) nounwind {
17 ; BEFORE-NEXT: br label %bb
18 ; AFTER-NEXT: br label %return
21 %x.0 = phi i64 [ 0, %entry ], [ %t0, %bb2 ]
23 %t1 = icmp slt i64 %x.0, %n
24 br i1 %t1, label %bb2, label %return
26 ; BEFORE: br i1 {{.*}}, label %bb2, label %return
31 %t2 = icmp slt i64 %x.0, %m
32 br i1 %t1, label %bb, label %return
34 ; BEFORE: br i1 {{.*}}, label %bb, label %return
41 ; CHECK-NEXT: ret void