1; RUN: opt -S -structurizecfg %s -o - | FileCheck %s
2
3; The structurizecfg pass cannot handle switch instructions, so we need to
4; make sure the lower switch pass is always run before structurizecfg.
5
6; CHECK-LABEL: @switch
7define void @switch(i32 addrspace(1)* %out, i32 %cond) nounwind {
8entry:
9; CHECK: icmp
10  switch i32 %cond, label %done [ i32 0, label %zero]
11
12; CHECK: zero:
13zero:
14; CHECK: store i32 7, i32 addrspace(1)* %out
15  store i32 7, i32 addrspace(1)* %out
16; CHECK: br label %done
17  br label %done
18
19; CHECK: done:
20done:
21; CHECK: ret void
22  ret void
23}
24