================
@@ -22,7 +22,7 @@
 ; CHECK: DEBUG_VALUE: foo:i <- 3
 ; CHECK: DEBUG_VALUE: foo:i <- 7
 ; CHECK: DEBUG_VALUE: foo:i <- %
-; CHECK: DEBUG_VALUE: foo:i <- [DW_OP_deref] $vrdepot
+; CHECK: DEBUG_VALUE: foo:i <- [DW_OP_deref] %
----------------
thetheodor wrote:

Ah, here's the problem; in main:
```
*** IR Dump After convert address space of alloca'ed memory to local 
(nvptx-lower-alloca) ***
; Function Attrs: nounwind ssp uwtable
define i32 @foo() #0 !dbg !6 {
entry:
  %i = alloca i32, align 4
  %0 = addrspacecast ptr %i to ptr addrspace(5)
  %1 = addrspacecast ptr addrspace(5) %0 to ptr
   ...
    #dbg_value(ptr %i, !11, !DIExpression(DW_OP_deref), !20)
```
with this PR:
```
; Function Attrs: nounwind ssp uwtable
define i32 @foo() #0 !dbg !6 {
entry:
  %i1 = alloca i32, align 4, addrspace(5)
  %0 = addrspacecast ptr addrspace(5) %i1 to ptr
...
    #dbg_value(ptr %0, !11, !DIExpression(DW_OP_deref), !20)
...

```

`nvptx-lower-alloca` was previously not updating debug info. I'll change the 
behavior to match this.
  

https://github.com/llvm/llvm-project/pull/154814
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to