1; RUN: opt < %s -simplifycfg -disable-output
2;
3; Test that SimplifyCFG does not cause CallBr instructions to have duplicate
4; destinations, which will cause the verifier to assert.
5
6define void @fun0() {
7entry:
8  callbr void asm sideeffect "", "X"(i8* blockaddress(@fun0, %bb1))
9          to label %bb2 [label %bb1]
10
11bb1:                                              ; preds = %bb
12  ret void
13
14bb2:                                             ; preds = %bb
15  ret void
16}
17
18define void @fun1() {
19entry:
20  callbr void asm sideeffect "", "X"(i8* blockaddress(@fun1, %bb1))
21          to label %bb2 [label %bb1]
22
23bb2:                                             ; preds = %bb
24  ret void
25
26bb1:                                              ; preds = %bb
27  ret void
28}
29