blob: 24074bf7271d6ee19c33d890118673db5defadf7 [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -indvars
Evan Cheng27b84062009-04-22 23:39:28 +00002; rdar://6817574
Evan Chengeecb8682009-04-22 22:45:37 +00003
Evan Cheng27b84062009-04-22 23:39:28 +00004define i32 @t1() nounwind ssp {
Evan Chengeecb8682009-04-22 22:45:37 +00005entry:
6 br label %bb32
7
8bb32: ; preds = %bb32, %entry
9 %mbPartIdx.0.reg2mem.0 = phi i8 [ %2, %bb32 ], [ 0, %entry ] ; <i8> [#uses=3]
10 %0 = and i8 %mbPartIdx.0.reg2mem.0, 1 ; <i8> [#uses=0]
11 %1 = zext i8 %mbPartIdx.0.reg2mem.0 to i64 ; <i64> [#uses=0]
12 %2 = add i8 %mbPartIdx.0.reg2mem.0, 1 ; <i8> [#uses=2]
13 %3 = icmp ugt i8 %2, 3 ; <i1> [#uses=1]
14 br i1 %3, label %bb41, label %bb32
15
16bb41: ; preds = %bb32
17 ret i32 0
18}
Evan Cheng27b84062009-04-22 23:39:28 +000019
20define i32 @t2() nounwind ssp {
21entry:
22 br label %bb116
23
24bb116: ; preds = %bb116, %entry
25 %mbPartIdx.1.reg2mem.0 = phi i8 [ %3, %bb116 ], [ 0, %entry ] ; <i8> [#uses=3]
26 %0 = and i8 %mbPartIdx.1.reg2mem.0, 1 ; <i8> [#uses=1]
27 %1 = zext i8 %mbPartIdx.1.reg2mem.0 to i64 ; <i64> [#uses=0]
28 %2 = zext i8 %0 to i32 ; <i32> [#uses=0]
29 %3 = add i8 %mbPartIdx.1.reg2mem.0, 1 ; <i8> [#uses=2]
30 %4 = icmp ugt i8 %3, 3 ; <i1> [#uses=1]
31 br i1 %4, label %bb131, label %bb116
32
33bb131: ; preds = %bb116
34 unreachable
35}