1# This test checks that we have a mapping between the B registers and their Codeview numbers. 2# There is no 8 bit float type so this is a modified version of codeview-h-register.mir to 3# have a B register in the location info but not the instructions. Which is incorrect 4# but in ways this test does not care about. 5# 6# RUN: llc %s -mtriple=arm64-windows -filetype=obj -o %t --start-after=unpack-mi-bundles 7# RUN: llvm-readobj --codeview %t | FileCheck %s --check-prefix=OBJ 8# 9# OBJ: LocalSym { 10# OBJ: Kind: S_LOCAL (0x113E) 11# OBJ: Type: __half (0x46) 12# OBJ: Flags [ (0x1) 13# OBJ: IsParameter (0x1) 14# OBJ: ] 15# OBJ: VarName: x 16# OBJ: } 17# OBJ: DefRangeRegisterSym { 18# OBJ: Kind: S_DEFRANGE_REGISTER (0x1141) 19# OBJ: Register: ARM64_B0 (0xE6) 20# OBJ: MayHaveNoName: 0 21# OBJ: LocalVariableAddrRange { 22# OBJ: OffsetStart: .text+0x0 23# OBJ: ISectStart: 0x0 24# OBJ: Range: 0x4 25# OBJ: } 26# OBJ: } 27# 28--- | 29 define internal fastcc i1 @test.fn(half %0) !dbg !4 { 30 Entry: 31 call void @llvm.dbg.value(metadata half %0, metadata !11, metadata !DIExpression()), !dbg !13 32 %1 = fcmp une half 0xH0000, %0, !dbg !14 33 ret i1 %1 34 } 35 36 ; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn 37 declare void @llvm.dbg.value(metadata, metadata, metadata) #0 38 39 attributes #0 = { nocallback nofree nosync nounwind readnone speculatable willreturn } 40 41 !llvm.module.flags = !{!0, !1} 42 !llvm.dbg.cu = !{!2} 43 44 !0 = !{i32 2, !"Debug Info Version", i32 3} 45 !1 = !{i32 2, !"CodeView", i32 1} 46 !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) 47 !3 = !DIFile(filename: "test", directory: ".") 48 !4 = distinct !DISubprogram(name: "fn", linkageName: "test.fn", scope: !5, file: !5, line: 32, type: !6, scopeLine: 32, flags: DIFlagStaticMember, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !2, retainedNodes: !10) 49 !5 = !DIFile(filename: "test.o", directory: ".") 50 !6 = !DISubroutineType(types: !7) 51 !7 = !{!8, !9} 52 !8 = !DIBasicType(name: "bool", size: 1, encoding: DW_ATE_boolean) 53 !9 = !DIBasicType(name: "f16", size: 16, encoding: DW_ATE_float) 54 !10 = !{!11} 55 !11 = !DILocalVariable(name: "x", arg: 1, scope: !12, file: !5, line: 32, type: !9) 56 !12 = distinct !DILexicalBlock(scope: !4, file: !5, line: 32, column: 1) 57 !13 = !DILocation(line: 32, column: 31, scope: !12) 58 !14 = !DILocation(line: 33, column: 5, scope: !15) 59 !15 = distinct !DILexicalBlock(scope: !12, file: !5) 60... 61--- 62name: test.fn 63body: | 64 bb.0: 65 liveins: $b0 66 DBG_VALUE $b0, $noreg, !11, !DIExpression(), debug-location !13 67 renamable $s0 = nofpexcept FCVTSHr killed renamable $h0, implicit $fpcr, debug-location !14 68 DBG_VALUE $b0, $noreg, !11, !DIExpression(DW_OP_LLVM_entry_value, 1), debug-location !13 69 nofpexcept FCMPSri killed renamable $s0, implicit-def $nzcv, implicit $fpcr, debug-location !14 70 renamable $w0 = CSINCWr $wzr, $wzr, 0, implicit killed $nzcv, debug-location !14 71 RET undef $lr, implicit killed $w0 72... 73