[PATCH] D59944: [DebugInfo] Fix pr41180 : Loop Vectorization Debugify Failure

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 09:47:52 PDT 2019


Orlando created this revision.
Orlando added reviewers: vsk, aprantl, mkuper, probinson, dblaikie.
Herald added subscribers: llvm-commits, jdoerfert, hiraditya.
Herald added a project: LLVM.

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

In the bug test case the debug location was missing for the cmp instruction in the "middle block" BB. This patch fixes the bug by copying the debug location from the cmp of the scalar loop's terminator branch, if it exists.

The patch also fixes the debug location on the subsequent branch instruction. It was previously using the location of the of the original loop's pre-header block terminator. Both of these instructions will now map to the source line of the conditional branch in the original loop.

A regression test has been added that covers these issues.


Repository:
  rL LLVM

https://reviews.llvm.org/D59944

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/middle-block-dbg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59944.192655.patch
Type: text/x-patch
Size: 6897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190328/01ea2494/attachment.bin>


More information about the llvm-commits mailing list