1; RUN: opt -gvn-hoist -S < %s | FileCheck %s
2
3; CHECK: store
4; CHECK-NOT: store
5
6; Check that an instruction can be hoisted to a basic block
7; with more than two successors.
8
9@G = external global i32, align 4
10
11define void @foo(i32 %c1) {
12entry:
13  switch i32 %c1, label %exit1 [
14    i32 0, label %sw0
15    i32 1, label %sw1
16  ]
17
18sw0:
19  store i32 1, i32* @G
20  br label %exit
21
22sw1:
23  store i32 1, i32* @G
24  br label %exit
25
26exit1:
27  store i32 1, i32* @G
28  ret void
29exit:
30  ret void
31}
32