mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 22:28:22 +00:00
5c6c5e23bd
This doesn't seem to have worked in a long time, but other optimizations would clean it up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222961 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
315 B
LLVM
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
|
|
}
|