[PATCH] D114588: [DebugInfo][InstrRef] "Final" test cleanup switching x86 tests to instruction referencing

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 26 03:15:11 PST 2021


djtodoro added inline comments.


================
Comment at: llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll:62
 ; CHECK: movq
+; CHECK: movl
 ; CHECK-NEXT: [[LABEL:Ltmp[0-9]*]]
----------------
jmorse wrote:
> djtodoro wrote:
> > why this? Is this a code change?
> It's not a code change, instead the position at which a variable location changes has moved. With DBG_VALUEs it's:
> 
>     DBG_VALUE $rdi
>     ....
>     $rbx = MOV64rr $rdi
>     DBG_VALUE $rbx, $noreg, !18, !DIExpression(), 
>     renamable $edi = MOV32rm $rdi, 1, $noreg, 0, $noreg, ... 
> 
> But with instruction referencing it's:
> 
>     DBG_VALUE $rdi
>     ...
>     $rbx = MOV64rr $rdi
>     renamable $edi = MOV32rm $rdi, 1, $noreg, 0, $noreg, 
>     DBG_VALUE $rbx, $noreg, !18, !DIExpression(), 
> 
> The reason why is that VarLocBasedLDV will follow the COPY from a volatile register to a non-volatile immediately, but InstrRefBasedLDV waits until $rdi is clobbered before moving the variable location. That moves the ".Ltmp" symbol for where the variable changes location to be one instruction later.
> 
> Looking at it again, it needs the comment above to be updated.
OK, got it. So the comment above should be updated.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114588/new/

https://reviews.llvm.org/D114588



More information about the llvm-commits mailing list