[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)
Theodoros Theodoridis via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 25 07:46:19 PDT 2025
================
@@ -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:
I'm not an expert either, but it looks correct to me:
The full debug annotation looks like this:
```
//DEBUG_VALUE: foo:i <- [DW_OP_deref] %1
.loc 1 10 0 // dbg-value-const-byref.c:10
```
which means that the value of `foo:i` at this location must be loaded through pointer `%1`.
And:
```
bb.0.entry:
$vrframelocal64 = MOV_DEPOT_ADDR_64 0
%0:b64 = LEA_ADDRi64 $vrframelocal64, 0
%1:b64 = cvta_local_64 %0:b64
...
ST_i32 %2:b32, 0, 0, 5, 32, $vrframelocal64, 0, debug-location !15 :: (store (s32) into %ir.i1, !tbaa !16, addrspace 5); dbg-value-const-byref.c:9
DBG_VALUE %1:b64, $noreg, !"i", !DIExpression(DW_OP_deref), debug-location !20; dbg-value-const-byref.c:10 line no:6
...
```
`%1` points to this location.
https://github.com/llvm/llvm-project/pull/154814
More information about the llvm-commits
mailing list