1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/CodeGen/X86/switch-default-only.ll
Hans Wennborg 22fda335d6 Switch lowering: Fix broken 'Figure out which block is next' code
This doesn't seem to have worked in a long time, but other optimizations
would clean it up.

llvm-svn: 222961
2014-11-29 21:17:05 +00:00

15 lines
315 B
LLVM

; 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
}