This is an archive of the discontinued LLVM Phabricator instance.

[GVN] Invalidate cached info for values replaced by equality propagation
ClosedPublic

Authored by john.brawn on Aug 24 2018, 8:03 AM.

Details

Summary

When GVN propagates an equality by replacing one value with another it also needs to invalidate the cached information for the value being replaced.

Diff Detail

Repository
rL LLVM

Event Timeline

john.brawn created this revision.Aug 24 2018, 8:03 AM

The testcase is a bit suspect; see https://bugs.llvm.org/show_bug.cgi?id=35229, I guess. Could probably use a better comment, at least.

john.brawn updated this revision to Diff 164422.Sep 7 2018, 8:10 AM

I've adjusted the comment in the test case. I'm pretty sure that the part that the test is testing (that PRE is happening) is correct even if the equality propagation didn't happen, as it's based on knowing that the value of two pointers differs by a nonzero value and not anything to do with the provenance of the pointers.

This revision is now accepted and ready to land.Sep 7 2018, 12:46 PM
This revision was automatically updated to reflect the committed changes.