1 ; RUN: opt < %s -S -passes=simple-loop-unswitch -verify-loop-info -verify-dom-info -verify-memoryssa | FileCheck %s
2 ; PR12343: -passes=simple-loop-unswitch crash on indirect branch
4 ; CHECK: %0 = icmp eq i64 undef, 0
5 ; CHECK-NEXT: br i1 %0, label %"5", label %"4"
7 ; CHECK: "5": ; preds = %entry
8 ; CHECK-NEXT: br label %"16"
10 ; CHECK: "16": ; preds = %"22", %"5"
11 ; CHECK-NEXT: indirectbr ptr undef, [label %"22", label %"33"]
13 ; CHECK: "22": ; preds = %"16"
14 ; CHECK-NEXT: br i1 %0, label %"16", label %"26"
16 ; CHECK: "26": ; preds = %"22"
17 ; CHECK-NEXT: unreachable
21 %0 = icmp eq i64 undef, 0
22 br i1 %0, label %"5", label %"4"
30 "16": ; preds = %"22", %"5"
31 indirectbr ptr undef, [label %"22", label %"33"]
34 br i1 %0, label %"16", label %"26"