brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.7 KiB · 39bfcda Raw
83 lines · plain
1;; Test coalescing of contiguous fragments in adjacent location definitions.2;; This test contains the first function from coalesce-simple.ll. Just use it3;; to check whether coalescing happens or not with different flag settings.4;;5;; +=================+==============================+======================+6;; | Coalescing flag | Instruction-Referencing flag | Coalescing behaviour |7;; +=================+==============================+======================+8;; | default         | enabled                      | enabled              |9;; | default         | disabled                     | disabled             |10;; | enabled         | *                            | enabled              |11;; | disabled        | *                            | disabled             |12;; +-----------------+------------------------------+----------------------+13 14;; Coalescing default + instructino-referencing enabled = enable.15; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \16; RUN: | FileCheck %s --check-prefixes=CHECK,ENABLE17 18;; Coalescing default + instructino-referencing disabled = disable.19; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=false \20; RUN: | FileCheck %s --check-prefixes=CHECK,DISABLE21 22;; Coalescing enabled + instructino-referencing disabled = enable.23; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=false \24; RUN:     -debug-ata-coalesce-frags=true \25; RUN: | FileCheck %s --check-prefixes=CHECK,ENABLE26 27;; Coalescing disabled + instructino-referencing enabled = disable.28; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \29; RUN:     -debug-ata-coalesce-frags=false \30; RUN: | FileCheck %s --check-prefixes=CHECK,DISABLE31 32; CHECK: MOV32mi %stack.0.a, 1, $noreg, 0, $noreg, 533; ENABLE-NEXT: DBG_VALUE %stack.0.a, $noreg, ![[#]], !DIExpression(DW_OP_deref)34; DISABLE-NEXT: DBG_VALUE %stack.0.a, $noreg, ![[#]], !DIExpression(DW_OP_deref, DW_OP_LLVM_fragment, 0, 32)35 36target triple = "x86_64-unknown-linux-gnu"37 38define dso_local void @_Z3funv() local_unnamed_addr !dbg !16 {39entry:40  %a = alloca i64, !DIAssignID !3741  call void @llvm.dbg.assign(metadata i64 poison, metadata !20, metadata !DIExpression(), metadata !37, metadata ptr %a, metadata !DIExpression()), !dbg !2542  call void @llvm.dbg.value(metadata i32 1, metadata !20, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !2543  store i32 5, ptr %a, !DIAssignID !3844  call void @llvm.dbg.assign(metadata i32 5, metadata !20, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32), metadata !38, metadata ptr %a, metadata !DIExpression()), !dbg !2545  ret void46}47 48declare void @llvm.dbg.value(metadata, metadata, metadata)49declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)50 51!llvm.dbg.cu = !{!2}52!llvm.module.flags = !{!8, !9, !10, !11, !12, !13, !14}53!llvm.ident = !{!15}54 55!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())56!1 = distinct !DIGlobalVariable(name: "G", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true)57!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 17.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)58!3 = !DIFile(filename: "test.cpp", directory: "/")59!4 = !{!0, !5}60!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())61!6 = distinct !DIGlobalVariable(name: "F", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true)62!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)63!8 = !{i32 7, !"Dwarf Version", i32 5}64!9 = !{i32 2, !"Debug Info Version", i32 3}65!10 = !{i32 1, !"wchar_size", i32 4}66!11 = !{i32 8, !"PIC Level", i32 2}67!12 = !{i32 7, !"PIE Level", i32 2}68!13 = !{i32 7, !"uwtable", i32 2}69!14 = !{i32 7, !"debug-info-assignment-tracking", i1 true}70!15 = !{!"clang version 17.0.0"}71!16 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funv", scope: !3, file: !3, line: 3, type: !17, scopeLine: 3, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !19)72!17 = !DISubroutineType(types: !18)73!18 = !{null}74!19 = !{!20}75!20 = !DILocalVariable(name: "X", scope: !16, file: !3, line: 4, type: !21)76!21 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Pair", file: !3, line: 2, size: 64, flags: DIFlagTypePassByValue, elements: !22, identifier: "_ZTS4Pair")77!22 = !{}78!25 = !DILocation(line: 0, scope: !16)79!26 = !DILocation(line: 7, column: 7, scope: !27)80!27 = distinct !DILexicalBlock(scope: !16, file: !3, line: 7, column: 7)81!37 = distinct !DIAssignID()82!38 = distinct !DIAssignID()83