1 ; RUN: opt < %s -indvars -S | FileCheck %s
2 ; rdar://10359193: assert "IndVar type must match IVInit type"
4 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
5 target triple = "thumbv7-apple-darwin"
9 ; CHECK: %exitcond = icmp ne i8* %destYPixelPtr.010.i, getelementptr (i8* null, i32 undef)
10 define void @test() nounwind {
15 br i1 undef, label %while.end, label %while.body
17 while.body: ; preds = %while.cond
18 br i1 undef, label %if.then165, label %while.cond
20 if.then165: ; preds = %while.body
21 br i1 undef, label %while.cond, label %for.body.lr.ph.i81
23 for.body.lr.ph.i81: ; preds = %if.then165
24 br label %for.body.i86
26 for.body.i86: ; preds = %for.end.i129, %for.body.lr.ph.i81
27 %cmp196.i = icmp ult i32 0, undef
28 br i1 %cmp196.i, label %for.body21.lr.ph.i, label %for.end.i129
30 for.body21.lr.ph.i: ; preds = %for.body.i86
31 br label %for.body21.i
34 %destYPixelPtr.010.i = phi i8* [ null, %for.body21.lr.ph.i ], [ %incdec.ptr.i, %if.end.i126 ]
35 %x.09.i = phi i32 [ 0, %for.body21.lr.ph.i ], [ %inc.i125, %if.end.i126 ]
36 br i1 undef, label %if.end.i126, label %if.else.i124
38 if.else.i124: ; preds = %for.body21.i
39 store i8 undef, i8* %destYPixelPtr.010.i, align 1
42 if.end.i126: ; preds = %if.else.i124, %for.body21.i
43 %incdec.ptr.i = getelementptr inbounds i8* %destYPixelPtr.010.i, i32 1
44 %inc.i125 = add i32 %x.09.i, 1
45 %cmp19.i = icmp ult i32 %inc.i125, undef
46 br i1 %cmp19.i, label %for.body21.i, label %for.end.i129
48 for.end.i129: ; preds = %if.end.i126, %for.body.i86
49 br i1 undef, label %for.body.i86, label %while.cond
51 while.end: ; preds = %while.cond
54 bail: ; preds = %while.end, %lor.lhs.false44, %lor.lhs.false41, %if.end29, %if.end
57 return: ; preds = %lor.lhs.false20, %lor.lhs.false12, %lor.lhs.false, %entry