• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
3;
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
10;
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
16
17define void @deleteme() {
18entry:
19  br label %loop
20loop:
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
25exit:
26  ret void
27}
28
29