[PATCH] D44546: [SelectionDAG] Transfer DbgValues when integer operations are promoted

Aaron Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 16:05:44 PDT 2018


asmith created this revision.
asmith added reviewers: vsk, JDevlieghere, aprantl.
Herald added a subscriber: llvm-commits.

DbgValue nodes were not transferred when integer DAG nodes were promoted. For example, if an i32 add node was promoted to an i64 add node by DAGTypeLegalizer::PromoteIntegerResult(), its DbgValue node was not transferred to the new node. The simple fix is to update SetPromotedInteger() to transfer DbgValues.

Patch by Se Jong Oh!


Repository:
  rL LLVM

https://reviews.llvm.org/D44546

Files:
  lib/CodeGen/SelectionDAG/LegalizeTypes.cpp


Index: lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+++ lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
@@ -776,6 +776,8 @@
   SDValue &OpEntry = PromotedIntegers[Op];
   assert(!OpEntry.getNode() && "Node is already promoted!");
   OpEntry = Result;
+
+  DAG.transferDbgValues(Op, Result);
 }
 
 void DAGTypeLegalizer::SetSoftenedFloat(SDValue Op, SDValue Result) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44546.138642.patch
Type: text/x-patch
Size: 475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180315/fc837bff/attachment.bin>


More information about the llvm-commits mailing list