1; RUN: opt < %s -loop-simplify -S 2; PR8702 3target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" 4target triple = "x86_64-unknown-freebsd9.0" 5 6declare void @foo(i32 %x) 7 8define fastcc void @inm_merge() nounwind { 9entry: 10 br label %for.cond 11 12for.cond: ; preds = %while.cond36.i, %entry 13 br i1 undef, label %do.body, label %for.body 14 15for.body: ; preds = %for.cond 16 br i1 undef, label %while.cond36.i, label %if.end44 17 18if.end44: ; preds = %for.body 19 %call49 = call fastcc i32 @inm_get_source() 20 br i1 undef, label %if.end54, label %for.cond64 21 22if.end54: ; preds = %if.end44 23 br label %while.cond36.i 24 25while.cond36.i: ; preds = %if.end54, %for.body 26 br label %for.cond 27 28for.cond64: ; preds = %if.end88, %for.cond64, %if.end44 29 %error.161 = phi i32 [ %error.161, %for.cond64 ], [ %error.161, %if.end88 ], [ %call49, %if.end44 ] 30 call void @foo(i32 %error.161) 31 br i1 undef, label %for.cond64, label %if.end88 32 33if.end88: ; preds = %for.cond64 34 br i1 undef, label %for.cond64, label %if.end98 35 36if.end98: ; preds = %if.end88 37 unreachable 38 39do.body: ; preds = %for.cond 40 unreachable 41} 42 43declare fastcc i32 @inm_get_source() nounwind 44