1*0ca8ddd8SRoman Lebedev; RUN: opt < %s -passes='function(loop-simplify),loop-extract' -disable-output 2cee313d2SEric Christopher 3cee313d2SEric Christopherdefine void @solve() { 4cee313d2SEric Christopherentry: 5cee313d2SEric Christopher br label %loopentry.0 6cee313d2SEric Christopher 7cee313d2SEric Christopherloopentry.0: ; preds = %endif.0, %entry 8cee313d2SEric Christopher br i1 false, label %no_exit.0, label %loopexit.0 9cee313d2SEric Christopher 10cee313d2SEric Christopherno_exit.0: ; preds = %loopentry.0 11cee313d2SEric Christopher br i1 false, label %then.0, label %endif.0 12cee313d2SEric Christopher 13cee313d2SEric Christopherthen.0: ; preds = %no_exit.0 14cee313d2SEric Christopher br i1 false, label %shortcirc_done, label %shortcirc_next 15cee313d2SEric Christopher 16cee313d2SEric Christophershortcirc_next: ; preds = %then.0 17cee313d2SEric Christopher br label %shortcirc_done 18cee313d2SEric Christopher 19cee313d2SEric Christophershortcirc_done: ; preds = %shortcirc_next, %then.0 20cee313d2SEric Christopher br i1 false, label %then.1, label %endif.1 21cee313d2SEric Christopher 22cee313d2SEric Christopherthen.1: ; preds = %shortcirc_done 23cee313d2SEric Christopher br i1 false, label %cond_true, label %cond_false 24cee313d2SEric Christopher 25cee313d2SEric Christophercond_true: ; preds = %then.1 26cee313d2SEric Christopher br label %cond_continue 27cee313d2SEric Christopher 28cee313d2SEric Christophercond_false: ; preds = %then.1 29cee313d2SEric Christopher br label %cond_continue 30cee313d2SEric Christopher 31cee313d2SEric Christophercond_continue: ; preds = %cond_false, %cond_true 32cee313d2SEric Christopher br label %return 33cee313d2SEric Christopher 34cee313d2SEric Christopherafter_ret.0: ; No predecessors! 35cee313d2SEric Christopher br label %endif.1 36cee313d2SEric Christopher 37cee313d2SEric Christopherendif.1: ; preds = %after_ret.0, %shortcirc_done 38cee313d2SEric Christopher br label %endif.0 39cee313d2SEric Christopher 40cee313d2SEric Christopherendif.0: ; preds = %endif.1, %no_exit.0 41cee313d2SEric Christopher br label %loopentry.0 42cee313d2SEric Christopher 43cee313d2SEric Christopherloopexit.0: ; preds = %loopentry.0 44cee313d2SEric Christopher br i1 false, label %then.2, label %endif.2 45cee313d2SEric Christopher 46cee313d2SEric Christopherthen.2: ; preds = %loopexit.0 47cee313d2SEric Christopher br i1 false, label %then.3, label %endif.3 48cee313d2SEric Christopher 49cee313d2SEric Christopherthen.3: ; preds = %then.2 50cee313d2SEric Christopher br label %return 51cee313d2SEric Christopher 52cee313d2SEric Christopherafter_ret.1: ; No predecessors! 53cee313d2SEric Christopher br label %endif.3 54cee313d2SEric Christopher 55cee313d2SEric Christopherendif.3: ; preds = %after_ret.1, %then.2 56cee313d2SEric Christopher br label %endif.2 57cee313d2SEric Christopher 58cee313d2SEric Christopherendif.2: ; preds = %endif.3, %loopexit.0 59cee313d2SEric Christopher br label %loopentry.1 60cee313d2SEric Christopher 61cee313d2SEric Christopherloopentry.1: ; preds = %no_exit.1, %endif.2 62cee313d2SEric Christopher br i1 false, label %no_exit.1, label %loopexit.1 63cee313d2SEric Christopher 64cee313d2SEric Christopherno_exit.1: ; preds = %loopentry.1 65cee313d2SEric Christopher br label %loopentry.1 66cee313d2SEric Christopher 67cee313d2SEric Christopherloopexit.1: ; preds = %loopentry.1 68cee313d2SEric Christopher br label %return 69cee313d2SEric Christopher 70cee313d2SEric Christopherafter_ret.2: ; No predecessors! 71cee313d2SEric Christopher br label %return 72cee313d2SEric Christopher 73cee313d2SEric Christopherreturn: ; preds = %after_ret.2, %loopexit.1, %then.3, %cond_continue 74cee313d2SEric Christopher ret void 75cee313d2SEric Christopher} 76