Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/DebugInfo/COFF/pieces.ll
; RUN: llc < %s -experimental-debug-variable-locations=false | FileCheck %s --check-prefix=ASM | ; RUN: llc < %s -experimental-debug-variable-locations=true | FileCheck %s --check-prefix=ASM | ||||
; RUN: llc < %s -filetype=obj -experimental-debug-variable-locations=false | llvm-readobj --codeview - | FileCheck %s --check-prefix=OBJ | ; RUN: llc < %s -filetype=obj -experimental-debug-variable-locations=true | llvm-readobj --codeview - | FileCheck %s --check-prefix=OBJ | ||||
; Compile with -O1 as C | ; Compile with -O1 as C | ||||
; struct IntPair { int x, y; }; | ; struct IntPair { int x, y; }; | ||||
; struct PadRight { long a; int b; }; | ; struct PadRight { long a; int b; }; | ||||
; struct PadLeft { int a; long b; }; | ; struct PadLeft { int a; long b; }; | ||||
; struct Nested { struct PadLeft a[2]; }; | ; struct Nested { struct PadLeft a[2]; }; | ||||
; | ; | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
; ASM: retq | ; ASM: retq | ||||
; ASM: [[pad_right_end:\.Lfunc_end1]]: | ; ASM: [[pad_right_end:\.Lfunc_end1]]: | ||||
; ASM-LABEL: pad_left: # @pad_left | ; ASM-LABEL: pad_left: # @pad_left | ||||
; ASM: .cv_loc 2 1 24 3 # t.c:24:3 | ; ASM: .cv_loc 2 1 24 3 # t.c:24:3 | ||||
; ASM: movq %rcx, %rax | ; ASM: movq %rcx, %rax | ||||
; ASM: [[pad_left_tmp:\.Ltmp[0-9]+]]: | ; ASM: [[pad_left_tmp:\.Ltmp[0-9]+]]: | ||||
; ASM: #DEBUG_VALUE: pad_left:o <- [DW_OP_LLVM_fragment 0 32] $eax | ; ASM: #DEBUG_VALUE: pad_left:o <- [DW_OP_LLVM_fragment 0 32] $ecx | ||||
; ASM: retq | ; ASM: retq | ||||
; ASM: [[pad_left_end:\.Lfunc_end2]]: | ; ASM: [[pad_left_end:\.Lfunc_end2]]: | ||||
; ASM-LABEL: nested: # @nested | ; ASM-LABEL: nested: # @nested | ||||
; ASM: #DEBUG_VALUE: nested:o <- [DW_OP_deref] [$rcx+0] | ; ASM: #DEBUG_VALUE: nested:o <- [DW_OP_deref] [$rcx+0] | ||||
; ASM: movl 12(%rcx), %eax | ; ASM: movl 12(%rcx), %eax | ||||
; ASM: [[p_start:\.Ltmp[0-9]+]]: | ; ASM: [[p_start:\.Ltmp[0-9]+]]: | ||||
; ASM: #DEBUG_VALUE: nested:p <- [DW_OP_LLVM_fragment 32 32] $eax | ; ASM: #DEBUG_VALUE: nested:p <- [DW_OP_LLVM_fragment 32 32] $eax | ||||
; ASM: retq | ; ASM: retq | ||||
; ASM-LABEL: bitpiece_spill: # @bitpiece_spill | ; ASM-LABEL: bitpiece_spill: # @bitpiece_spill | ||||
; ASM: #DEBUG_VALUE: bitpiece_spill:o <- [DW_OP_LLVM_fragment 0 32] 0 | ; ASM: #DEBUG_VALUE: bitpiece_spill:o <- [DW_OP_LLVM_fragment 0 32] 0 | ||||
; ASM: xorl %ecx, %ecx | ; ASM: xorl %ecx, %ecx | ||||
; ASM: callq g | ; ASM: callq g | ||||
; ASM: movl %eax, [[offset_o_x:[0-9]+]](%rsp) # 4-byte Spill | ; ASM: movl %eax, [[offset_o_x:[0-9]+]](%rsp) # 4-byte Spill | ||||
; ASM: [[spill_o_x_start:\.Ltmp[0-9]+]]: | ; ASM: [[spill_o_x_start:\.Ltmp[0-9]+]]: | ||||
; ASM: #DEBUG_VALUE: bitpiece_spill:o <- [DW_OP_plus_uconst [[offset_o_x]], DW_OP_LLVM_fragment 32 32] [$rsp+0] | ; ASM: #DEBUG_VALUE: bitpiece_spill:o <- [DW_OP_plus_uconst [[offset_o_x]], DW_OP_LLVM_fragment 32 32] [$rsp+0] | ||||
; ASM: #APP | ; ASM: #APP | ||||
; ASM: #NO_APP | ; ASM: #NO_APP | ||||
; ASM: movl [[offset_o_x]](%rsp), %eax # 4-byte Reload | ; ASM: movl [[offset_o_x]](%rsp), %eax # 4-byte Reload | ||||
; ASM: [[spill_o_x_end:\.Ltmp[0-9]+]]: | |||||
; ASM: #DEBUG_VALUE: bitpiece_spill:o <- [DW_OP_LLVM_fragment 32 32] $eax | |||||
; ASM: retq | ; ASM: retq | ||||
; ASM-NEXT: [[spill_o_x_end:\.Ltmp[0-9]+]]: | ; ASM: [[spill_o_x_end_func:\.Ltmp[0-9]+]]: | ||||
; ASM-NEXT: .Lfunc_end4: | ; ASM-NEXT: .Lfunc_end4: | ||||
; ASM-LABEL: .short 4423 # Record kind: S_GPROC32_ID | ; ASM-LABEL: .short 4423 # Record kind: S_GPROC32_ID | ||||
; ASM: .asciz "loop_csr" # Function name | ; ASM: .asciz "loop_csr" # Function name | ||||
; ASM: .short 4414 # Record kind: S_LOCAL | ; ASM: .short 4414 # Record kind: S_LOCAL | ||||
; ASM: .asciz "o" | ; ASM: .asciz "o" | ||||
; ASM: .cv_def_range [[oy_ox_start]] [[ox_start]], subfield_reg, 24, 0 | ; ASM: .cv_def_range [[oy_ox_start]] [[ox_start]], subfield_reg, 24, 0 | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
; OBJ: } | ; OBJ: } | ||||
; OBJ: ProcEnd { | ; OBJ: ProcEnd { | ||||
; OBJ: } | ; OBJ: } | ||||
; ASM-LABEL: .short 4423 # Record kind: S_GPROC32_ID | ; ASM-LABEL: .short 4423 # Record kind: S_GPROC32_ID | ||||
; ASM: .asciz "pad_left" # Function name | ; ASM: .asciz "pad_left" # Function name | ||||
; ASM: .short 4414 # Record kind: S_LOCAL | ; ASM: .short 4414 # Record kind: S_LOCAL | ||||
; ASM: .asciz "o" | ; ASM: .asciz "o" | ||||
; ASM: .cv_def_range [[pad_left_tmp]] [[pad_left_end]], subfield_reg, 17, 0 | ; ASM: .cv_def_range [[pad_left_tmp]] [[pad_left_end]], subfield_reg, 18, 0 | ||||
; OBJ-LABEL: GlobalProcIdSym { | ; OBJ-LABEL: GlobalProcIdSym { | ||||
; OBJ: Kind: S_GPROC32_ID (0x1147) | ; OBJ: Kind: S_GPROC32_ID (0x1147) | ||||
; OBJ: DisplayName: pad_left | ; OBJ: DisplayName: pad_left | ||||
; OBJ: } | ; OBJ: } | ||||
; OBJ: LocalSym { | ; OBJ: LocalSym { | ||||
; OBJ: VarName: o | ; OBJ: VarName: o | ||||
; OBJ: } | ; OBJ: } | ||||
; OBJ: DefRangeSubfieldRegisterSym { | ; OBJ: DefRangeSubfieldRegisterSym { | ||||
; OBJ: Register: EAX (0x11) | ; OBJ: Register: ECX (0x12) | ||||
; OBJ: MayHaveNoName: 0 | ; OBJ: MayHaveNoName: 0 | ||||
; OBJ: OffsetInParent: 0 | ; OBJ: OffsetInParent: 0 | ||||
; OBJ: LocalVariableAddrRange { | ; OBJ: LocalVariableAddrRange { | ||||
; OBJ: } | ; OBJ: } | ||||
; OBJ: } | ; OBJ: } | ||||
; OBJ: ProcEnd { | ; OBJ: ProcEnd { | ||||
; OBJ: } | ; OBJ: } | ||||
Show All 35 Lines | |||||
; OBJ: ProcEnd { | ; OBJ: ProcEnd { | ||||
; OBJ: } | ; OBJ: } | ||||
; ASM-LABEL: .short 4423 # Record kind: S_GPROC32_ID | ; ASM-LABEL: .short 4423 # Record kind: S_GPROC32_ID | ||||
; ASM: .asciz "bitpiece_spill" # Function name | ; ASM: .asciz "bitpiece_spill" # Function name | ||||
; ASM: .short 4414 # Record kind: S_LOCAL | ; ASM: .short 4414 # Record kind: S_LOCAL | ||||
; ASM: .asciz "o" | ; ASM: .asciz "o" | ||||
; ASM: .cv_def_range [[spill_o_x_start]] .Lfunc_end4, reg_rel, 335, 65, 36 | ; ASM: .cv_def_range [[spill_o_x_start]] [[spill_o_x_end]], reg_rel, 335, 65, 36 | ||||
; ASM: .cv_def_range [[spill_o_x_end]] .Lfunc_end4, subfield_reg, 17, 4 | |||||
; OBJ-LABEL: GlobalProcIdSym { | ; OBJ-LABEL: GlobalProcIdSym { | ||||
; OBJ: Kind: S_GPROC32_ID (0x1147) | ; OBJ: Kind: S_GPROC32_ID (0x1147) | ||||
; OBJ: DisplayName: bitpiece_spill | ; OBJ: DisplayName: bitpiece_spill | ||||
; OBJ: } | ; OBJ: } | ||||
; OBJ: LocalSym { | ; OBJ: LocalSym { | ||||
; OBJ: VarName: o | ; OBJ: VarName: o | ||||
; OBJ: } | ; OBJ: } | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |