161 lines · plain
1# RUN: llc -mtriple=thumbv6m-apple-unknown-macho --run-pass=arm-cp-islands -o - %s | FileCheck %s2--- |3 ; ModuleID = 'test.ll'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"7 8 define i32 @foo(i32 %in) !dbg !5 {9 call void @llvm.dbg.value(metadata i32 0, metadata !9, metadata !DIExpression()), !dbg !1110 switch i32 %in, label %default [11 i32 0, label %l012 i32 1, label %l113 i32 2, label %l214 i32 3, label %l315 ], !dbg !1116 17 default: ; preds = %018 ret i32 42, !dbg !1219 20 l0: ; preds = %021 ret i32 0, !dbg !1322 23 l1: ; preds = %024 ret i32 1, !dbg !1425 26 l2: ; preds = %027 ret i32 2, !dbg !1528 29 l3: ; preds = %030 ret i32 3, !dbg !1631 }32 33 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)34 declare void @llvm.dbg.value(metadata, metadata, metadata) #035 36 attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }37 38 !llvm.dbg.cu = !{!0}39 !llvm.debugify = !{!2, !3}40 !llvm.module.flags = !{!4}41 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: "/")44 !2 = !{i32 6}45 !3 = !{i32 1}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)49 !7 = !{}50 !8 = !{!9}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)59 60...61---62name: foo63alignment: 264exposesReturnsTwice: false65legalized: false66regBankSelected: false67selected: false68failedISel: false69tracksRegLiveness: true70hasWinCFI: false71callsEHReturn: false72callsUnwindInit: false73hasEHContTarget: false74hasEHScopes: false75hasEHFunclets: false76debugInstrRef: false77failsVerification: false78tracksDebugUserValues: true79registers: []80liveins:81 - { reg: '$r0', virtual-reg: '' }82frameInfo:83 isFrameAddressTaken: false84 isReturnAddressTaken: false85 hasStackMap: false86 hasPatchPoint: false87 stackSize: 088 offsetAdjustment: 089 maxAlignment: 190 adjustsStack: false91 hasCalls: false92 stackProtector: ''93 functionContext: ''94 maxCallFrameSize: 095 cvBytesOfCalleeSavedRegisters: 096 hasOpaqueSPAdjustment: false97 hasVAStart: false98 hasMustTailInVarArgFunc: false99 hasTailCall: false100 localFrameSize: 0101 savePoint: []102 restorePoint: []103fixedStack: []104stack: []105callSites: []106debugValueSubstitutions: []107constants: []108machineFunctionInfo: {}109jumpTable:110 kind: inline111 entries:112 - id: 0113 blocks: [ '%bb.3', '%bb.4', '%bb.5', '%bb.6' ]114body: |115 bb.0 (%ir-block.0):116 successors: %bb.2(0x19999998), %bb.1(0x66666668)117 liveins: $r0118 119 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11120 tCMPi8 renamable $r0, 3, 14 /* CC::al */, $noreg, implicit-def $cpsr, debug-location !11121 tBcc %bb.2, 8 /* CC::hi */, killed $cpsr, debug-location !11122 123 bb.1 (%ir-block.0):124 successors: %bb.3(0x20000000), %bb.4(0x20000000), %bb.5(0x20000000), %bb.6(0x20000000)125 liveins: $r0126 127 renamable $r0, dead $cpsr = tLSLri killed renamable $r0, 2, 14 /* CC::al */, $noreg128 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11129 renamable $r1 = tLEApcrelJT %jump-table.0, 14 /* CC::al */, $noreg130 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 */, $noreg132 tBR_JTr killed renamable $r0, %jump-table.0133 ; CHECK: tTBB_JT134 135 bb.3.l0:136 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11137 renamable $r0, dead $cpsr = tMOVi8 0, 14 /* CC::al */, $noreg138 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !13139 140 bb.2.default:141 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11142 renamable $r0, dead $cpsr = tMOVi8 42, 14 /* CC::al */, $noreg143 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !12144 145 bb.4.l1:146 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11147 renamable $r0, dead $cpsr = tMOVi8 1, 14 /* CC::al */, $noreg148 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !14149 150 bb.5.l2:151 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11152 renamable $r0, dead $cpsr = tMOVi8 2, 14 /* CC::al */, $noreg153 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !15154 155 bb.6.l3:156 DBG_VALUE 0, $noreg, !9, !DIExpression(), debug-location !11157 renamable $r0, dead $cpsr = tMOVi8 3, 14 /* CC::al */, $noreg158 tBX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !16159 160...161