blob: faf185fb72994ba73852864571ada19c228621a6 [file] [log] [blame]
Michael J. Spencerccd28d02010-08-24 21:04:52 +00001; The purpose of this test is to see if the COFF object writer can properly
2; relax the fixups that are created for jump tables on x86-64. See PR7960.
3
4; This test case was reduced from Lua/lapi.c.
5
Michael J. Spencerc8dbdfd2010-10-09 11:01:07 +00006; This test has yet to be converted to assembly becase llvm-mc cannot read
7; x86-64 COFF code yet.
8
Michael J. Spencerccd28d02010-08-24 21:04:52 +00009; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o %t
10; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o %t
11
12define void @lua_gc(i32 %what) nounwind {
13entry:
14 switch i32 %what, label %sw.epilog [
15 i32 0, label %sw.bb
16 i32 1, label %sw.bb
17 i32 2, label %sw.bb
18 i32 3, label %sw.bb14
19 i32 4, label %sw.bb18
20 i32 6, label %sw.bb57
21 ]
22
23sw.bb: ; preds = %entry, %entry, %entry
24 ret void
25
26sw.bb14: ; preds = %entry
27 ret void
28
29sw.bb18: ; preds = %entry
30 ret void
31
32sw.bb57: ; preds = %entry
33 ret void
34
35sw.epilog: ; preds = %entry
36 ret void
37}