llvm-6502/test/CodeGen/Thumb2/thumb2-jumptbl.ll
David Goodwin c9a59b5960 Improve Thumb-2 jump table support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 19:50:22 +00:00

27 lines
428 B
LLVM

; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {ldr\\W*pc,} | count 1
define i32 @foo(i32 %a) nounwind {
entry:
switch i32 %a, label %bb4 [
i32 1, label %bb5
i32 2, label %bb1
i32 3, label %bb2
i32 5, label %bb3
]
bb1: ; preds = %entry
ret i32 1
bb2: ; preds = %entry
ret i32 1234
bb3: ; preds = %entry
ret i32 3456
bb4: ; preds = %entry
ret i32 0
bb5: ; preds = %entry
ret i32 12
}