This is an archive of the discontinued LLVM Phabricator instance.

[LoopRotate] Fix for dbg.value propagation
ClosedPublic

Authored by samparker on Mar 7 2017, 10:06 AM.

Details

Reviewers
thakis
aprantl
Summary

The patch of D30190 was reverted in r297159. This patch should address the bug raised in https://bugs.llvm.org/show_bug.cgi?id=32171 as well as a similar issue that Adrian had pointed out, but I missed, in the previous review.

Diff Detail

Event Timeline

samparker created this revision.Mar 7 2017, 10:06 AM
aprantl accepted this revision.Mar 7 2017, 10:19 AM

Inline comments, otherwise looks ok.

lib/Transforms/Scalar/LoopRotation.cpp
185

auto *

186

I think you still want a dyn_cast_or_null here. Optimizations sometimes delete an llvm::Value without deleting debug intrinsics pointing to it.

189

You could get rid of all curly braces here if you want to.

This revision is now accepted and ready to land.Mar 7 2017, 10:19 AM
samparker added inline comments.Mar 8 2017, 2:03 AM
lib/Transforms/Scalar/LoopRotation.cpp
186

Yes, thank you!

samparker closed this revision.Mar 8 2017, 2:59 AM

submitted in r297269