1 ; RUN: opt < %s -S -simple-loop-unswitch -verify-loop-info -verify-dom-info | FileCheck %s
2 ; RUN: opt < %s -S -simple-loop-unswitch -verify-loop-info -verify-dom-info -enable-mssa-loop-dependency=true -verify-memoryssa | FileCheck %s
3 ; PR12343: -simple-loop-unswitch crash on indirect branch
5 ; CHECK: %0 = icmp eq i64 undef, 0
6 ; CHECK-NEXT: br i1 %0, label %"5", label %"4"
8 ; CHECK: "5": ; preds = %entry
9 ; CHECK-NEXT: br label %"16"
11 ; CHECK: "16": ; preds = %"22", %"5"
12 ; CHECK-NEXT: indirectbr i8* undef, [label %"22", label %"33"]
14 ; CHECK: "22": ; preds = %"16"
15 ; CHECK-NEXT: br i1 %0, label %"16", label %"26"
17 ; CHECK: "26": ; preds = %"22"
18 ; CHECK-NEXT: unreachable
22 %0 = icmp eq i64 undef, 0
23 br i1 %0, label %"5", label %"4"
31 "16": ; preds = %"22", %"5"
32 indirectbr i8* undef, [label %"22", label %"33"]
35 br i1 %0, label %"16", label %"26"