]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/X86/switch-default-only.ll
Vendor import of llvm trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / test / CodeGen / X86 / switch-default-only.ll
1 ; RUN: llc -O0 -fast-isel=false -mtriple=i686-- < %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 }