[llvm-dev] [SelectionDAG] DbgValue nodes aren't transferred

Se Jong Oh via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 8 17:44:55 PST 2018


Hi,

I have a problem that dbg_value nodes are not transferred when integer DAG nodes are promoted. For example, an i32 add node is promoted to a i64 add node by DAGTypeLegalizer::PromoteIntegerResult and its dbg_value node is not transferred to the new node.

t9: i32 = add nsw t5, t8 -->  t31: i64 = add t30, t7   ; the dbg_value node is not transferred to the new i64 add node.

For expansion, DAGTypeLegalizer::SetExpandedInteger calls transferDbgValues() but I couldn't find any place to call trasnferDbgValues() for integer type promotion in DAGTypeLegalizer ::SetPromotedInteger and other places. I am wondering If I miss anything or the legalization needs to call transferDbgValues() for this case.

I found this problem because a recently added unittest, DebugInfo/X86/linear-dbg-value.ll fails for my project, and the x86 and aarch64 backends don't have this problem since they don't promote i32 add nodes.

Thanks,
Sejong

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180309/f62ecaee/attachment.html>


More information about the llvm-dev mailing list