[PATCH] D25611: When moving a zext near to its associated load, do not retain the origial debug location.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 11:01:34 PDT 2016


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

Ok. I'm fine with doing this as long as we document clearly why we are doing it, so we can remove safely remove it later should it become unnecessary. (see inline comment)



================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4273
   I->insertAfter(LI);
+  // Conservatively reuse the same debug location for the load and the zext.
+  I->setDebugLoc(LI->getDebugLoc());
----------------
Please insert the longer explanation of why we are doing this from the testcase 19-22 here.


https://reviews.llvm.org/D25611





More information about the llvm-commits mailing list