Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-objdump / MachO / data-in-code.ll
blobd214bf65322cd02624209cdd96277dcb36ad6d00
1 ; RUN: llc --mtriple x86_64-apple-darwin -filetype=obj -O0 %s -o %t.o
2 ; RUN: llvm-objdump --macho -d --no-show-raw-insn %t.o | FileCheck %s
3 ; RUN: llvm-otool -tv %t.o | FileCheck %s
5 ; CHECK: .long {{[0-9]+}}       @ KIND_JUMP_TABLE32
6 ; CHECK: .long {{[0-9]+}}       @ KIND_JUMP_TABLE32
7 ; CHECK: .long {{[0-9]+}}       @ KIND_JUMP_TABLE32
8 ; CHECK: .long {{[0-9]+}}       @ KIND_JUMP_TABLE32
9 ; CHECK-NOT: invalid instruction encoding
10 ; CHECK-NOT: <unknown>
12 ; ModuleID = '-'
13 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
14 target triple = "x86_64-apple-macosx10.12.0"
16 ; Function Attrs: noinline nounwind optnone ssp uwtable
17 define void @switchfunc(i32 %i) {
18   switch i32 %i, label %out [
19     i32 0, label %case1
20     i32 1, label %case2
21     i32 2, label %case3
22     i32 3, label %case4
23   ]
25 case1:
26   call void @foo()
27   br label %out
29 case2:
30   call void @bar()
31   br label %out
33 case3:
34   call void @foo()
35   br label %out
37 case4:
38   call void @bar()
39   br label %out
41 out:
42   ret void
45 declare void @foo()
46 declare void @bar()