mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 02:32:08 +00:00
ce750f0332
This currently only catches the most basic case, a two-case switch, but can be extended later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119964 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
433 B
LLVM
23 lines
433 B
LLVM
; RUN: llc -march=x86 -asm-verbose=false < %s | FileCheck %s
|
|
|
|
; Check that merging switch cases that differ in one bit works.
|
|
; CHECK: orl $2
|
|
; CHECK-NEXT: cmpl $6
|
|
|
|
define void @foo(i32 %variable) nounwind {
|
|
entry:
|
|
switch i32 %variable, label %if.end [
|
|
i32 4, label %if.then
|
|
i32 6, label %if.then
|
|
]
|
|
|
|
if.then:
|
|
%call = tail call i32 (...)* @bar() nounwind
|
|
ret void
|
|
|
|
if.end:
|
|
ret void
|
|
}
|
|
|
|
declare i32 @bar(...) nounwind
|