[PATCH] D60556: [DebugInfo at O2] Fix pr41175 Dead Store Elimination missing debug loc

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 02:11:28 PDT 2019


Orlando created this revision.
Orlando added reviewers: aprantl, vsk, junbuml.
Orlando added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Bug: https://bugs.llvm.org/show_bug.cgi?id=41175

In the bug test case the DSE pass is shortening the range of memory that a memset is working on. A getelementptr is generated so that the new starting address can be passed to memset. This instruction was not given a DebugLoc.

To fix the bug I copy the DebugLoc from the memset instruction.
I've added a test that checks this.


Repository:
  rL LLVM

https://reviews.llvm.org/D60556

Files:
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/test/Transforms/DeadStoreElimination/memset-missing-debugloc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60556.194648.patch
Type: text/x-patch
Size: 5022 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190411/84c9a72f/attachment.bin>


More information about the llvm-commits mailing list