aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/switch-default-only.ll
blob: 360ace5b787f6d1b5bac699559c6e18a8c25aed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llc -O0 -fast-isel=false -march=x86 < %s | FileCheck %s

; No need for branching when the default and only destination follows
; immediately after the switch.
; CHECK-LABEL: no_branch:
; CHECK-NOT: jmp
; CHECK: ret

define void @no_branch(i32 %x) {
entry:
  switch i32 %x, label %exit [ ]
exit:
  ret void
}