1 # RUN: llc -mtriple=thumbv6m-apple-unknown-macho --run-pass=arm-cp-islands -o - %s | FileCheck %s
4 source_filename = "simple.ll"
5 target datalayout = "e-m:o-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
6 target triple = "thumbv6m-apple-unknown-macho"
8 define i32 @foo(i32 %in) !dbg !5 {
9 call void @llvm.dbg.value(metadata i32 0, metadata !9, metadata !DIExpression()), !dbg !11
10 switch i32 %in, label %default [
33 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
34 declare void @llvm.dbg.value(metadata, metadata, metadata) #0
36 attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
39 !llvm.debugify = !{!2, !3}
40 !llvm.module.flags = !{!4}
42 !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
43 !1 = !DIFile(filename: "simple.ll", directory: "/")
46 !4 = !{i32 2, !"Debug Info Version", i32 3}
47 !5 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !8)
48 !6 = !DISubroutineType(types: !7)
51 !9 = !DILocalVariable(name: "1", scope: !5, file: !1, line: 1, type: !10)
52 !10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
53 !11 = !DILocation(line: 1, column: 1, scope: !5)
54 !12 = !DILocation(line: 2, column: 1, scope: !5)
55 !13 = !DILocation(line: 3, column: 1, scope: !5)
56 !14 = !DILocation(line: 4, column: 1, scope: !5)
57 !15 = !DILocation(line: 5, column: 1, scope: !5)
58 !16 = !DILocation(line: 6, column: 1, scope: !5)
64 exposesReturnsTwice: false
66 regBankSelected: false
69 tracksRegLiveness: true
72 callsUnwindInit: false
77 failsVerification: false
78 tracksDebugUserValues: true
81 - { reg: '$r0', virtual-reg: '' }
83 isFrameAddressTaken: false
84 isReturnAddressTaken: false
95 cvBytesOfCalleeSavedRegisters: 0
96 hasOpaqueSPAdjustment: false
98 hasMustTailInVarArgFunc: false
106 debugValueSubstitutions: []
108 machineFunctionInfo: {}
113 blocks: [ '%bb.3', '%bb.4', '%bb.5', '%bb.6' ]
116 successors: %bb.2(0x19999998), %bb.1(0x66666668)
119 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11
120 tCMPi8 renamable $r0, 3, 14 /* CC::al */, $noreg, implicit-def $cpsr, debug-location !11
121 tBcc %bb.2, 8 /* CC::hi */, killed $cpsr, debug-location !11
124 successors: %bb.3(0x20000000), %bb.4(0x20000000), %bb.5(0x20000000), %bb.6(0x20000000)
127 renamable $r0, dead $cpsr = tLSLri killed renamable $r0, 2, 14 /* CC::al */, $noreg
128 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11
129 renamable $r1 = tLEApcrelJT %jump-table.0, 14 /* CC::al */, $noreg
130 renamable $r0 = tLDRr renamable $r1, killed renamable $r0, 14 /* CC::al */, $noreg :: (load (s32) from jump-table)
131 renamable $r0, dead $cpsr = tADDrr killed renamable $r1, killed renamable $r0, 14 /* CC::al */, $noreg
132 tBR_JTr killed renamable $r0, %jump-table.0
136 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11
137 renamable $r0, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg
138 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !13
141 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11
142 renamable $r0, dead $cpsr = tMOVi8 42, 14 /* CC::al */, $noreg
143 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !12
146 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11
147 renamable $r0, dead $cpsr = tMOVi8 1, 14 /* CC::al */, $noreg
148 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !14
151 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11
152 renamable $r0, dead $cpsr = tMOVi8 2, 14 /* CC::al */, $noreg
153 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !15
156 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11
157 renamable $r0, dead $cpsr = tMOVi8 3, 14 /* CC::al */, $noreg
158 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !16