[llvm] Handle #dbg_values in SROA. (PR #94070)

Shubham Sandeep Rastogi via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 10:43:43 PDT 2024


rastogishubham wrote:

One thing I wanted to mention was to do with the test llvm/test/DebugInfo/Generic/mem2reg-promote-alloca-1.ll

If we replace the `call void @llvm.dbg.value(metadata ptr %param.addr, metadata !16, metadata !DIExpression(DW_OP_deref)), !dbg !17` on line 34 with a `call void @llvm.dbg.declare(metadata ptr %param.addr, metadata !16, metadata !DIExpression()), !dbg !17`

The `llvm.dbg.declare` is converted to a `llvm.dbg.value` and is moved to just before the store, but the test expects that a `llvm.dbg.value` should be removed instead, both inputs result in the same `llvm.dbg.value` being generated before the store. Therefore I have changed the test to reflect that. However, that does change the original intent of the test, so I was wondering if we should just delete the test instead? Any opinions on this @OCHyams @SLTozer ?

https://github.com/llvm/llvm-project/pull/94070


More information about the llvm-commits mailing list