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
5 ; Loop should be rotated for -Os but not for -Oz.
6 ; OS: rotating Loop at depth 1
7 ; OZ-NOT: rotating Loop at depth 1
11 declare void @use(i32)
15 %end = load i32, i32* @e
19 %n.phi = phi i32 [ %n, %loop.fin ], [ 0, %entry ]
20 %cond = icmp eq i32 %n.phi, %end
21 br i1 %cond, label %exit, label %loop.fin
24 %n = add i32 %n.phi, 1
25 call void @use(i32 %n)