1 ; Make sure that Loop which was invalidated by loop-deletion
2 ; does not lead to problems for -print-after-all and is just skipped.
4 ; RUN: opt < %s -disable-output \
5 ; RUN: -passes=loop-instsimplify -print-after-all 2>&1 | FileCheck %s -check-prefix=SIMPLIFY
6 ; RUN: opt < %s -disable-output \
7 ; RUN: -passes=loop-deletion,loop-instsimplify -print-after-all 2>&1 | FileCheck %s -check-prefix=DELETED
8 ; RUN: opt < %s -disable-output \
9 ; RUN: -passes=loop-deletion,loop-instsimplify -print-after-all -print-module-scope 2>&1 | FileCheck %s -check-prefix=DELETED-BUT-PRINTED
11 ; SIMPLIFY: IR Dump {{.*}} LoopInstSimplifyPass
12 ; DELETED-NOT: IR Dump {{.*}}LoopInstSimplifyPass
13 ; DELETED-NOT: IR Dump {{.*}}LoopDeletionPass
14 ; DELETED-BUT-PRINTED: IR Dump {{.*}}LoopDeletionPass {{.*invalidated:}}
15 ; DELETED-BUT-PRINTED-NOT: IR Dump {{.*}}LoopInstSimplifyPass
17 define void @deleteme() {
21 %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]
22 %iv.next = add i32 %iv, 1
23 %check = icmp ult i32 %iv.next, 3
24 br i1 %check, label %loop, label %exit