blob: 38d15ffbd880e0e343edbfe3242effad5e892f97 [file] [log] [blame]
Dan Gohman8a977e22010-01-26 19:25:59 +00001; RUN: opt < %s -analyze -scalar-evolution \
Dan Gohman19211b42009-07-21 00:50:52 +00002; RUN: | FileCheck %s
3; PR4569
4
5define i16 @main() nounwind {
6entry:
7 br label %bb.i
8
9bb.i: ; preds = %bb1.i, %bb.nph
10 %l_95.0.i1 = phi i8 [ %tmp1, %bb.i ], [ 0, %entry ]
11
12; This cast shouldn't be folded into the addrec.
13; CHECK: %tmp = zext i8 %l_95.0.i1 to i16
Dan Gohman30733292010-01-09 18:17:45 +000014; CHECK: --> (zext i8 {0,+,-1}<%bb.i> to i16) Exits: 2
Dan Gohman19211b42009-07-21 00:50:52 +000015
16 %tmp = zext i8 %l_95.0.i1 to i16
17
18 %tmp1 = add i8 %l_95.0.i1, -1
19 %phitmp = icmp eq i8 %tmp1, 1
20 br i1 %phitmp, label %bb1.i.func_36.exit_crit_edge, label %bb.i
21
22bb1.i.func_36.exit_crit_edge:
23 ret i16 %tmp
24}