This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo][InstMerge] Fix -debugify for phi node created by -mldst-motion
ClosedPublic

Authored by rupprecht on Nov 1 2018, 6:08 PM.

Details

Summary

-mldst-motion creates a new phi node without any debug info. Use the merged debug location from the incoming stores to fix this.

Fixes PR38177. The test case here is (somewhat) simplified from:

struct S {
  int foo;
  void fn(int bar);
};
void S::fn(int bar) {
  if (bar)
    foo = 1;
  else
    foo = 0;
}

Diff Detail

Repository
rL LLVM

Event Timeline

rupprecht created this revision.Nov 1 2018, 6:08 PM
vsk accepted this revision.Nov 2 2018, 8:08 AM
vsk added a subscriber: vsk.

Thanks, lgtm!

This revision is now accepted and ready to land.Nov 2 2018, 8:08 AM
This revision was automatically updated to reflect the committed changes.