brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.3 KiB · 131b4e5 Raw
126 lines · plain
1# RUN: llc -O2 %s -start-after=arm-mve-vpt-opts -stop-after=arm-prera-ldst-opt -o -  | FileCheck %s2# CHECK: DBG_VALUE 13, $noreg, !11, !DIExpression(), debug-location !133 4 5# This test checks to make sure that a DBG_VALUE that uses an immediate doesn't get zero-ed out by a DBG_VALUE that comes later in the basic block, and describes the same variable.6 7--- |8  ; ModuleID = '/Users/shubham/Development/llvm-project/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll'9  source_filename = "/Users/shubham/Development/llvm-project/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll"10  target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"11  target triple = "armv8-unknown-linux"12  13  ; Function Attrs: uwtable14  define i32 @main() !dbg !6 {15  entry:16    %c = alloca i32, align 417    tail call void @llvm.dbg.value(metadata i32 13, metadata !11, metadata !DIExpression()), !dbg !1318    store volatile i32 13, ptr %c, align 4, !dbg !1419    %call = tail call i32 @_Z4funcv(), !dbg !1520    tail call void @llvm.dbg.value(metadata i32 %call, metadata !11, metadata !DIExpression()), !dbg !1321    store volatile i32 %call, ptr %c, align 4, !dbg !1522    tail call void @llvm.dbg.value(metadata ptr %c, metadata !11, metadata !DIExpression(DW_OP_deref)), !dbg !1323    %c.0.c.0. = load volatile i32, ptr %c, align 4, !dbg !1624    ret i32 %c.0.c.0., !dbg !1625  }26  27  declare i32 @_Z4funcv()28  29  declare void @llvm.dbg.value(metadata, metadata, metadata)30  31  !llvm.dbg.cu = !{!0}32  !llvm.module.flags = !{!3, !4}33  !llvm.ident = !{!5}34  35  !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.6.0 (trunk 223522)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2)36  !1 = !DIFile(filename: "test.cpp", directory: "/home/kromanova/ngh/ToT_latest/llvm/test/DebugInfo")37  !2 = !{}38  !3 = !{i32 2, !"Dwarf Version", i32 2}39  !4 = !{i32 2, !"Debug Info Version", i32 3}40  !5 = !{!"clang version 3.6.0 (trunk 223522)"}41  !6 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !7, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !10)42  !7 = !DISubroutineType(types: !8)43  !8 = !{!9}44  !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)45  !10 = !{!11}46  !11 = !DILocalVariable(name: "c", scope: !6, file: !1, line: 5, type: !12)47  !12 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !9)48  !13 = !DILocation(line: 5, column: 16, scope: !6)49  !14 = !DILocation(line: 5, column: 3, scope: !6)50  !15 = !DILocation(line: 6, column: 7, scope: !6)51  !16 = !DILocation(line: 7, column: 3, scope: !6)52 53...54---55name:            main56alignment:       457exposesReturnsTwice: false58legalized:       false59regBankSelected: false60selected:        false61failedISel:      false62tracksRegLiveness: true63hasWinCFI:       false64callsEHReturn:   false65callsUnwindInit: false66hasEHContTarget: false67hasEHScopes:     false68hasEHFunclets:   false69isOutlined:      false70debugInstrRef:   false71failsVerification: false72tracksDebugUserValues: false73registers:74  - { id: 0, class: gpr, preferred-register: '' }75  - { id: 1, class: gpr, preferred-register: '' }76  - { id: 2, class: gpr, preferred-register: '' }77liveins:         []78frameInfo:79  isFrameAddressTaken: false80  isReturnAddressTaken: false81  hasStackMap:     false82  hasPatchPoint:   false83  stackSize:       084  offsetAdjustment: 085  maxAlignment:    486  adjustsStack:    true87  hasCalls:        true88  stackProtector:  ''89  functionContext: ''90  maxCallFrameSize: 091  cvBytesOfCalleeSavedRegisters: 092  hasOpaqueSPAdjustment: false93  hasVAStart:      false94  hasMustTailInVarArgFunc: false95  hasTailCall:     false96  localFrameSize:  497  savePoint:       []98  restorePoint:    []99fixedStack:      []100stack:101  - { id: 0, name: c, type: default, offset: 0, size: 4, alignment: 4, 102      stack-id: default, callee-saved-register: '', callee-saved-restored: true, 103      local-offset: -4, debug-info-variable: '', debug-info-expression: '', 104      debug-info-location: '' }105callSites:       []106debugValueSubstitutions: []107constants:       []108machineFunctionInfo: {}109body:             |110  bb.0.entry:111    DBG_VALUE 13, $noreg, !11, !DIExpression(), debug-location !13112    %0:gpr = MOVi 13, 14 /* CC::al */, $noreg, $noreg113    STRi12 killed %0, %stack.0.c, 0, 14 /* CC::al */, $noreg, debug-location !14 :: (volatile store (s32) into %ir.c)114    ADJCALLSTACKDOWN 0, 0, 14 /* CC::al */, $noreg, implicit-def dead $sp, implicit $sp, debug-location !15115    BL @_Z4funcv, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $r0, debug-location !15116    ADJCALLSTACKUP 0, -1, 14 /* CC::al */, $noreg, implicit-def dead $sp, implicit $sp, debug-location !15117    %1:gpr = COPY $r0, debug-location !15118    DBG_VALUE %1, $noreg, !11, !DIExpression(), debug-location !13119    STRi12 %1, %stack.0.c, 0, 14 /* CC::al */, $noreg, debug-location !15 :: (volatile store (s32) into %ir.c)120    DBG_VALUE %stack.0.c, $noreg, !11, !DIExpression(DW_OP_deref), debug-location !13121    %2:gpr = LDRi12 %stack.0.c, 0, 14 /* CC::al */, $noreg, debug-location !16 :: (volatile dereferenceable load (s32) from %ir.c)122    $r0 = COPY %2, debug-location !16123    BX_RET 14 /* CC::al */, $noreg, implicit $r0, debug-location !16124 125...126