<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Sergey,</div><div class=""><br class=""></div><div class="">I’m seeing a regression in LLVM trunk (which is not in 3.6.0): <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24117&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Ss5_wIpvxGHoV6PuCuDuCk3-16osUBMo_0eU1x-EhuY&s=mCVyZGUeAHcmWKkkmxjJ28bpcLelFssmV2QybGqf9_k&e=" class="">https://llvm.org/bugs/show_bug.cgi?id=24117</a>, and I’ve tracked it down to this commit.  Do you think you could take a look at it?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Kuba</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">------------------------------------------------------------------------</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">r235977 | sdmitrouk | 2015-04-28 13:56:37 +0200 (Tue, 28 Apr 2015) | 20 lines</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">[DebugInfo] Add debug locations to constant SD nodes</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">This adds debug location to constant nodes of Selection DAG and updates</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">all places that create constants to pass debug locations</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">(see PR13269).</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Can't guarantee that all locations are correct, but in a lot of cases choice</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">is obvious, so most of them should be. At least all tests pass.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Tests for these changes do not cover everything, instead just check it for</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">SDNodes, ARM and AArch64 where it's easy to get incorrect locations on</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">constants.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">This is not complete fix as FastISel contains workaround for wrong debug</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">locations, which drops locations from instructions on processing constants,</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">but there isn't currently a way to use debug locations from constants there</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">as llvm::Constant doesn't cache it (yet). Although this is a bit different</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">issue, not directly related to these changes.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D9084&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Ss5_wIpvxGHoV6PuCuDuCk3-16osUBMo_0eU1x-EhuY&s=9-I_ejV-0V50yQJPV24lOhv2V68lbkyAgjmAWxTlq3w&e=" class="">http://reviews.llvm.org/D9084</a></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">------------------------------------------------------------------------</div></blockquote><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div></div><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_SystemZ_SystemZISelDAGToDAG.cpp-3Frev-3D235977-26r1-3D235976-26r2-3D235977-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Ss5_wIpvxGHoV6PuCuDuCk3-16osUBMo_0eU1x-EhuY&s=5CROuB0WjHGexPXQMNrPuG_y31ybV1e01oiPkrp9oco&e=" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp?rev=235977&r1=235976&r2=235977&view=diff</a>
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp Tue Apr 28 06:56:37 2015
@@ -131,7 +131,7 @@ class SystemZDAGToDAGISel : public Selec
 
   // Used by SystemZOperands.td to create integer constants.
   inline SDValue getImm(const SDNode *Node, uint64_t Imm) const {
-    return CurDAG->getTargetConstant(Imm, Node->getValueType(0));
+    return CurDAG->getTargetConstant(Imm, SDLoc(Node), Node->getValueType(0));
   }
 
   const SystemZTargetMachine &getTargetMachine() const {
@@ -596,7 +596,7 @@ void SystemZDAGToDAGISel::getAddressOper
   }
 
   // Lower the displacement to a TargetConstant.
-  Disp = CurDAG->getTargetConstant(AM.Disp, VT);
+  Disp = CurDAG->getTargetConstant(AM.Disp, SDLoc(Base), VT);
 } ...</pre></blockquote><br class=""></div></body></html>