1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -loop-reduce 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Workerdefine void @resolve_name() nounwind uwtable ssp { 4*9880d681SAndroid Build Coastguard Worker br label %while.cond40.preheader 5*9880d681SAndroid Build Coastguard Workerwhile.cond132.while.cond.loopexit_crit_edge: 6*9880d681SAndroid Build Coastguard Worker br label %while.cond40.preheader 7*9880d681SAndroid Build Coastguard Workerwhile.cond40.preheader: 8*9880d681SAndroid Build Coastguard Worker br label %while.cond40 9*9880d681SAndroid Build Coastguard Workerwhile.cond40: 10*9880d681SAndroid Build Coastguard Worker %indvars.iv194 = phi i8* [ null, %while.cond40.preheader ], [ %scevgep, %while.body51 ] 11*9880d681SAndroid Build Coastguard Worker %tmp.1 = phi i8* [ undef, %while.cond40.preheader ], [ %incdec.ptr, %while.body51 ] 12*9880d681SAndroid Build Coastguard Worker switch i8 undef, label %while.body51 [ 13*9880d681SAndroid Build Coastguard Worker i8 0, label %if.then59 14*9880d681SAndroid Build Coastguard Worker ] 15*9880d681SAndroid Build Coastguard Workerwhile.body51: ; preds = %land.end50 16*9880d681SAndroid Build Coastguard Worker %incdec.ptr = getelementptr inbounds i8, i8* %tmp.1, i64 1 17*9880d681SAndroid Build Coastguard Worker %scevgep = getelementptr i8, i8* %indvars.iv194, i64 1 18*9880d681SAndroid Build Coastguard Worker br label %while.cond40 19*9880d681SAndroid Build Coastguard Workerif.then59: ; preds = %while.end 20*9880d681SAndroid Build Coastguard Worker br i1 undef, label %if.then64, label %if.end113 21*9880d681SAndroid Build Coastguard Workerif.then64: ; preds = %if.then59 22*9880d681SAndroid Build Coastguard Worker %incdec.ptr88.tmp.2 = select i1 undef, i8* undef, i8* undef 23*9880d681SAndroid Build Coastguard Worker br label %if.end113 24*9880d681SAndroid Build Coastguard Workerif.end113: ; preds = %if.then64, %if.then59 25*9880d681SAndroid Build Coastguard Worker %tmp.4 = phi i8* [ %incdec.ptr88.tmp.2, %if.then64 ], [ undef, %if.then59 ] 26*9880d681SAndroid Build Coastguard Worker %tmp.4195 = ptrtoint i8* %tmp.4 to i64 27*9880d681SAndroid Build Coastguard Worker br label %while.cond132.preheader 28*9880d681SAndroid Build Coastguard Workerwhile.cond132.preheader: ; preds = %if.end113 29*9880d681SAndroid Build Coastguard Worker %cmp133173 = icmp eq i8* %tmp.1, %tmp.4 30*9880d681SAndroid Build Coastguard Worker br i1 %cmp133173, label %while.cond40.preheader, label %while.body139.lr.ph 31*9880d681SAndroid Build Coastguard Workerwhile.body139.lr.ph: ; preds = %while.cond132.preheader 32*9880d681SAndroid Build Coastguard Worker %scevgep198 = getelementptr i8, i8* %indvars.iv194, i64 0 33*9880d681SAndroid Build Coastguard Worker %scevgep198199 = ptrtoint i8* %scevgep198 to i64 34*9880d681SAndroid Build Coastguard Worker br label %while.body139 35*9880d681SAndroid Build Coastguard Workerwhile.body139: ; preds = %while.body139, %while.body139.lr.ph 36*9880d681SAndroid Build Coastguard Worker %start_of_var.0177 = phi i8* [ %tmp.1, %while.body139.lr.ph ], [ null, %while.body139 ] 37*9880d681SAndroid Build Coastguard Worker br i1 undef, label %while.cond132.while.cond.loopexit_crit_edge, label %while.body139 38*9880d681SAndroid Build Coastguard Worker} 39