Hans Wennborg | 6c42d1a | 2014-11-29 21:17:05 +0000 | [diff] [blame] | 1 | ; RUN: llc -O0 -fast-isel=false -march=x86 < %s | FileCheck %s |
2 | |||||
3 | ; No need for branching when the default and only destination follows | ||||
4 | ; immediately after the switch. | ||||
5 | ; CHECK-LABEL: no_branch: | ||||
6 | ; CHECK-NOT: jmp | ||||
7 | ; CHECK: ret | ||||
8 | |||||
9 | define void @no_branch(i32 %x) { | ||||
10 | entry: | ||||
11 | switch i32 %x, label %exit [ ] | ||||
12 | exit: | ||||
13 | ret void | ||||
14 | } |