blob: 316df57ea7364a8d3058762d349b3334ee9cb0c5 [file] [log] [blame]
Tom Stellardd3e916e2013-10-02 17:04:59 +00001; 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}