1 ; RUN: opt < %s -S -loop-rotate -o - -verify-loop-info -verify-dom-info | FileCheck %s
2 ; RUN: opt < %s -S -loop-rotate -o - -verify-loop-info -verify-dom-info -enable-mssa-loop-dependency=true -verify-memoryssa | FileCheck %s
5 define void @z80_do_opcodes() nounwind {
9 while.cond: ; preds = %end_opcode, %entry
12 while.body: ; preds = %while.cond
13 br label %indirectgoto
15 run_opcode: ; preds = %indirectgoto
16 %tmp276 = load i8, i8* undef ; <i8> [#uses=1]
17 br label %indirectgoto
19 if.else295: ; preds = %divide_late
22 end_opcode: ; preds = %indirectgoto, %sw.default42406, %sw.default, %if.else295
23 %opcode.2 = phi i8 [ %opcode.0, %indirectgoto ], [ 0, %sw.default42406 ], [ undef, %sw.default ], [ %opcode.0, %if.else295 ] ; <i8> [#uses=0]
24 switch i32 undef, label %while.cond [
25 i32 221, label %sw.bb11691
26 i32 253, label %sw.bb30351
29 sw.bb11691: ; preds = %end_opcode
32 sw.default: ; preds = %sw.bb11691
35 sw.bb30351: ; preds = %end_opcode
36 br label %sw.default42406
38 sw.default42406: ; preds = %sw.bb30351
41 indirectgoto: ; preds = %run_opcode, %while.body
42 %opcode.0 = phi i8 [ undef, %while.body ], [ %tmp276, %run_opcode ] ; <i8> [#uses=2]
43 indirectbr i8* undef, [label %run_opcode, label %if.else295, label %end_opcode]
47 define void @foo(i1 %a, i1 %b, i8* %c) {
49 ; CHECK-NEXT: br i1 %a, label %return, label %preheader
51 br i1 %a, label %return, label %preheader
54 ; CHECK-NEXT: br label %header
59 ; CHECK-NEXT: br i1 %b, label %return, label %body
61 br i1 %b, label %return, label %body
64 ; CHECK-NEXT: indirectbr i8* %c, [label %return, label %latch]
66 indirectbr i8* %c, [label %return, label %latch]
69 ; CHECK-NEXT: br label %header