1 ; RUN: opt -S -passes='loop-unroll,loop-mssa(licm),print<scalar-evolution>' -unroll-count=4 -disable-output < %s 2>&1 | FileCheck %s --check-prefix=SCEV-EXPR
4 ; SCEV-EXPR: Classifying expressions for: @main
5 ; SCEV-EXPR-NEXT: %mul = phi i16 [ 1, %entry ], [ %mul.n.3, %loop ]
6 ; SCEV-EXPR-NEXT: --> %mul U: [0,-15) S: [-32768,32753) Exits: 4096 LoopDispositions: { %loop: Variant }
7 ; SCEV-EXPR-NEXT: %div = phi i16 [ 32767, %entry ], [ %div.n.3, %loop ]
8 ; SCEV-EXPR-NEXT: --> %div U: [-2048,-32768) S: [-2048,-32768) Exits: 7 LoopDispositions: { %loop: Variant }
9 ; SCEV-EXPR-NEXT: %mul.n.reass.reass = mul i16 %mul, 8
10 ; SCEV-EXPR-NEXT: --> (8 * %mul) U: [0,-7) S: [-32768,32761) Exits: -32768 LoopDispositions: { %loop: Variant }
15 %mul = phi i16 [ 1, %entry ], [ %mul.n, %loop ]
16 %div = phi i16 [ 32767, %entry ], [ %div.n, %loop ]
17 %mul.n = mul i16 %mul, 2
18 %div.n = sdiv i16 %div, 2
19 %cmp = icmp sgt i16 %div, 0
20 br i1 %cmp, label %loop, label %end