11c8c5449SAdrian Prantl; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump --name cntrl_flags - | FileCheck %s 21c8c5449SAdrian Prantl; CHECK: DW_OP_reg0 W0 31c8c5449SAdrian Prantl; 41c8c5449SAdrian Prantl; void use(unsigned char); 51c8c5449SAdrian Prantl; f(unsigned long long cntrl_flags, 61c8c5449SAdrian Prantl; int page_count) 71c8c5449SAdrian Prantl; { 81c8c5449SAdrian Prantl; unsigned char tag; 91c8c5449SAdrian Prantl; tag = (((cntrl_flags) >> 32) & 0xFF); 101c8c5449SAdrian Prantl; use(tag); 111c8c5449SAdrian Prantl; } 121c8c5449SAdrian Prantl 131c8c5449SAdrian Prantlsource_filename = "test.i" 141c8c5449SAdrian Prantltarget datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" 151c8c5449SAdrian Prantltarget triple = "arm64-apple-ios5.0.0" 161c8c5449SAdrian Prantl 171c8c5449SAdrian Prantl; Function Attrs: nounwind ssp uwtable 181c8c5449SAdrian Prantldefine i32 @f(i64 %cntrl_flags) local_unnamed_addr #0 !dbg !8 { 191c8c5449SAdrian Prantlentry: 201c8c5449SAdrian Prantl tail call void @llvm.dbg.value(metadata i64 %cntrl_flags, metadata !14, metadata !DIExpression()), !dbg !18 211c8c5449SAdrian Prantl %shr = lshr i64 %cntrl_flags, 32, !dbg !20 221c8c5449SAdrian Prantl %conv = trunc i64 %shr to i8, !dbg !21 231c8c5449SAdrian Prantl tail call void @llvm.dbg.value(metadata i8 %conv, metadata !16, metadata !DIExpression()), !dbg !22 241c8c5449SAdrian Prantl tail call void @use(i8 zeroext %conv) #3, !dbg !23 251c8c5449SAdrian Prantl ret i32 undef, !dbg !24 261c8c5449SAdrian Prantl} 271c8c5449SAdrian Prantl 281c8c5449SAdrian Prantldeclare void @use(i8 zeroext) local_unnamed_addr 291c8c5449SAdrian Prantl 301c8c5449SAdrian Prantl; Function Attrs: nounwind readnone speculatable 311c8c5449SAdrian Prantldeclare void @llvm.dbg.value(metadata, metadata, metadata) #2 321c8c5449SAdrian Prantl 331c8c5449SAdrian Prantlattributes #0 = { nounwind ssp uwtable } 341c8c5449SAdrian Prantlattributes #2 = { nounwind readnone speculatable } 351c8c5449SAdrian Prantlattributes #3 = { nobuiltin nounwind } 361c8c5449SAdrian Prantl 371c8c5449SAdrian Prantl!llvm.dbg.cu = !{!0} 381c8c5449SAdrian Prantl!llvm.module.flags = !{!3, !4, !5, !6} 391c8c5449SAdrian Prantl!llvm.ident = !{!7} 401c8c5449SAdrian Prantl 411c8c5449SAdrian Prantl!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) 421c8c5449SAdrian Prantl!1 = !DIFile(filename: "test.i", directory: "/") 431c8c5449SAdrian Prantl!2 = !{} 441c8c5449SAdrian Prantl!3 = !{i32 2, !"Dwarf Version", i32 2} 451c8c5449SAdrian Prantl!4 = !{i32 2, !"Debug Info Version", i32 3} 461c8c5449SAdrian Prantl!5 = !{i32 1, !"wchar_size", i32 4} 471c8c5449SAdrian Prantl!6 = !{i32 7, !"PIC Level", i32 2} 481c8c5449SAdrian Prantl!7 = !{!"clang version 6.0.0 (trunk 317700) (llvm/trunk 317708)"} 49*2c864551SShiva Chen!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) 501c8c5449SAdrian Prantl!9 = !DISubroutineType(types: !10) 511c8c5449SAdrian Prantl!10 = !{!11, !11} 521c8c5449SAdrian Prantl!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 531c8c5449SAdrian Prantl!12 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned) 541c8c5449SAdrian Prantl!13 = !{!14, !16} 551c8c5449SAdrian Prantl!14 = !DILocalVariable(name: "cntrl_flags", arg: 1, scope: !8, file: !1, line: 2, type: !12) 561c8c5449SAdrian Prantl!16 = !DILocalVariable(name: "tag", scope: !8, file: !1, line: 5, type: !17) 571c8c5449SAdrian Prantl!17 = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char) 581c8c5449SAdrian Prantl!18 = !DILocation(line: 2, column: 22, scope: !8) 591c8c5449SAdrian Prantl!19 = !DILocation(line: 3, column: 31, scope: !8) 601c8c5449SAdrian Prantl!20 = !DILocation(line: 6, column: 24, scope: !8) 611c8c5449SAdrian Prantl!21 = !DILocation(line: 6, column: 8, scope: !8) 621c8c5449SAdrian Prantl!22 = !DILocation(line: 5, column: 16, scope: !8) 631c8c5449SAdrian Prantl!23 = !DILocation(line: 7, column: 2, scope: !8) 641c8c5449SAdrian Prantl!24 = !DILocation(line: 8, column: 1, scope: !8) 65