65 lines · plain
1; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump --name cntrl_flags - | FileCheck %s2; CHECK: DW_OP_reg0 W03;4; void use(unsigned char);5; f(unsigned long long cntrl_flags,6; int page_count)7; {8; unsigned char tag;9; tag = (((cntrl_flags) >> 32) & 0xFF);10; use(tag);11; }12 13source_filename = "test.i"14target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"15target triple = "arm64-apple-ios5.0.0"16 17; Function Attrs: nounwind ssp uwtable18define i32 @f(i64 %cntrl_flags) local_unnamed_addr #0 !dbg !8 {19entry:20 tail call void @llvm.dbg.value(metadata i64 %cntrl_flags, metadata !14, metadata !DIExpression()), !dbg !1821 %shr = lshr i64 %cntrl_flags, 32, !dbg !2022 %conv = trunc i64 %shr to i8, !dbg !2123 tail call void @llvm.dbg.value(metadata i8 %conv, metadata !16, metadata !DIExpression()), !dbg !2224 tail call void @use(i8 zeroext %conv) #3, !dbg !2325 ret i32 undef, !dbg !2426}27 28declare void @use(i8 zeroext) local_unnamed_addr 29 30; Function Attrs: nounwind readnone speculatable31declare void @llvm.dbg.value(metadata, metadata, metadata) #232 33attributes #0 = { nounwind ssp uwtable }34attributes #2 = { nounwind readnone speculatable }35attributes #3 = { nobuiltin nounwind }36 37!llvm.dbg.cu = !{!0}38!llvm.module.flags = !{!3, !4, !5, !6}39!llvm.ident = !{!7}40 41!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.0 (trunk 317700) (llvm/trunk 317708)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)42!1 = !DIFile(filename: "test.i", directory: "/")43!2 = !{}44!3 = !{i32 2, !"Dwarf Version", i32 2}45!4 = !{i32 2, !"Debug Info Version", i32 3}46!5 = !{i32 1, !"wchar_size", i32 4}47!6 = !{i32 7, !"PIC Level", i32 2}48!7 = !{!"clang version 6.0.0 (trunk 317700) (llvm/trunk 317708)"}49!8 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !9, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !13)50!9 = !DISubroutineType(types: !10)51!10 = !{!11, !11}52!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)53!12 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)54!13 = !{!14, !16}55!14 = !DILocalVariable(name: "cntrl_flags", arg: 1, scope: !8, file: !1, line: 2, type: !12)56!16 = !DILocalVariable(name: "tag", scope: !8, file: !1, line: 5, type: !17)57!17 = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char)58!18 = !DILocation(line: 2, column: 22, scope: !8)59!19 = !DILocation(line: 3, column: 31, scope: !8)60!20 = !DILocation(line: 6, column: 24, scope: !8)61!21 = !DILocation(line: 6, column: 8, scope: !8)62!22 = !DILocation(line: 5, column: 16, scope: !8)63!23 = !DILocation(line: 7, column: 2, scope: !8)64!24 = !DILocation(line: 8, column: 1, scope: !8)65