2 ; RUN: opt < %s -S -Os -debug -debug-only=loop-rotate 2>&1 | FileCheck %s -check-prefix=OS
3 ; RUN: opt < %s -S -Oz -debug -debug-only=loop-rotate 2>&1 | FileCheck %s -check-prefix=OZ
4 ; RUN: opt < %s -S -passes='default<Os>' -debug -debug-only=loop-rotate 2>&1 | FileCheck %s -check-prefix=OS
5 ; RUN: opt < %s -S -passes='default<Oz>' -debug -debug-only=loop-rotate 2>&1 | FileCheck %s -check-prefix=OZ
7 ; Loop should be rotated for -Os but not for -Oz.
8 ; OS: rotating Loop at depth 1
9 ; OZ-NOT: rotating Loop at depth 1
13 declare void @use(i32)
17 %end = load i32, ptr @e
21 %n.phi = phi i32 [ %n, %loop.fin ], [ 0, %entry ]
22 %cond = icmp eq i32 %n.phi, %end
23 br i1 %cond, label %exit, label %loop.fin
26 %n = add i32 %n.phi, 1
27 call void @use(i32 %n)