brintos

brintos / llvm-project-archived public Read only

0
0
Text · 970 B · bce32db Raw
27 lines · plain
1; Make sure that Loop which was invalidated by loop-deletion2; 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=SIMPLIFY6; RUN: opt < %s -disable-output \7; RUN:     -passes=loop-deletion,loop-instsimplify -print-after-all  2>&1 | FileCheck %s -check-prefix=DELETED8; RUN: opt < %s -disable-output \9; RUN:     -passes=loop-deletion,loop-instsimplify -print-after-all -print-module-scope  2>&1 | FileCheck %s -check-prefix=DELETED10;11; SIMPLIFY: IR Dump {{.*}} LoopInstSimplifyPass12; DELETED: IR Dump {{.*}}LoopDeletionPass {{.*}}(invalidated)13; DELETED-NOT: IR Dump {{.*}}LoopInstSimplifyPass14 15define void @deleteme() {16entry:17  br label %loop18loop:19  %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ]20  %iv.next = add i32 %iv, 121  %check = icmp ult i32 %iv.next, 322  br i1 %check, label %loop, label %exit23exit:24  ret void25}26 27