brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 9699c10 Raw
78 lines · plain
1; RUN: llc -filetype=asm %s -o - | FileCheck %s2; Test large integral function arguments passed in multiple registers.3;4; Generated from (-Os):5;6; signed long long g;7; void write(signed long long offset);8; signed long long foo(signed long long offset) {9;   if (offset != g)10;     write(offset);11;   return offset;12; }13source_filename = "test.ii"14target datalayout = "e-m:o-p:32:32-i64:64-a:0:32-n32-S128"15target triple = "thumbv7k-apple-watchos2.0.0"16 17@g = local_unnamed_addr global i64 0, align 8, !dbg !018 19; Function Attrs: optsize ssp20define i64 @_Z3foox(i64 returned) local_unnamed_addr #0 !dbg !13 {21  tail call void @llvm.dbg.value(metadata i64 %0, metadata !17, metadata !DIExpression()), !dbg !1822  ; CHECK: @DEBUG_VALUE: foo:offset <- [DW_OP_LLVM_fragment 0 32] $r523  ; CHECK: @DEBUG_VALUE: foo:offset <- [DW_OP_LLVM_fragment 32 32] $r424 25  %2 = load i64, ptr @g, align 8, !dbg !19, !tbaa !2126  %3 = icmp eq i64 %2, %0, !dbg !1927  br i1 %3, label %5, label %4, !dbg !2528 29; <label>:4:                                      ; preds = %130  tail call void @_Z5writex(i64 %0) #3, !dbg !2631  br label %5, !dbg !2632 33; <label>:5:                                      ; preds = %1, %434  ret i64 %0, !dbg !2735}36 37; Function Attrs: optsize38declare void @_Z5writex(i64) local_unnamed_addr #139 40; Function Attrs: nounwind readnone speculatable41declare void @llvm.dbg.value(metadata, metadata, metadata) #242 43attributes #0 = { optsize ssp }44attributes #1 = { optsize }45attributes #2 = { nounwind readnone speculatable }46attributes #3 = { optsize }47 48!llvm.dbg.cu = !{!2}49!llvm.module.flags = !{!7, !8, !9, !10, !11}50 51!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())52!1 = distinct !DIGlobalVariable(name: "g", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)53!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 6.0.0 (trunk 312148) (llvm/trunk 312165)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)54!3 = !DIFile(filename: "test.ii", directory: "/")55!4 = !{}56!5 = !{!0}57!6 = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)58!7 = !{i32 2, !"Dwarf Version", i32 4}59!8 = !{i32 2, !"Debug Info Version", i32 3}60!9 = !{i32 1, !"wchar_size", i32 4}61!10 = !{i32 1, !"min_enum_size", i32 4}62!11 = !{i32 7, !"PIC Level", i32 2}63!13 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foox", scope: !3, file: !3, line: 3, type: !14, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !16)64!14 = !DISubroutineType(types: !15)65!15 = !{!6, !6}66!16 = !{!17}67!17 = !DILocalVariable(name: "offset", arg: 1, scope: !13, file: !3, line: 3, type: !6)68!18 = !DILocation(line: 3, scope: !13)69!19 = !DILocation(line: 4, scope: !20)70!20 = distinct !DILexicalBlock(scope: !13, file: !3, line: 4)71!21 = !{!22, !22, i64 0}72!22 = !{!"long long", !23, i64 0}73!23 = !{!"omnipotent char", !24, i64 0}74!24 = !{!"Simple C++ TBAA"}75!25 = !DILocation(line: 4, scope: !13)76!26 = !DILocation(line: 5, scope: !20)77!27 = !DILocation(line: 6, scope: !13)78