This is an archive of the discontinued LLVM Phabricator instance.

[MemoryDependence] Fix invariant group store
ClosedPublic

Authored by wsmoses on Mar 9 2021, 8:56 AM.

Details

Summary

Fix bug in MemoryDependence [and thus GVN] for invariant group

Diff Detail

Event Timeline

wsmoses created this revision.Mar 9 2021, 8:56 AM
wsmoses requested review of this revision.Mar 9 2021, 8:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2021, 8:56 AM

The test needs to be simplified, remove malloc and print, all geps and bitcasts, metadata, flags, ... everything except the store %p, %p_ptr and the load %p.

Explain in the commit message what the patch does, sure it fixes an error, but what error, e.g., a store is only invariant to a load if the pointer operands are the same.

Other than that, the logic is sound and fixes the problem.

wsmoses updated this revision to Diff 329367.Mar 9 2021, 9:38 AM

Minimize test

bmahjour removed a subscriber: bmahjour.Mar 9 2021, 9:51 AM
jdoerfert accepted this revision.Mar 9 2021, 10:54 AM

LG, with the updated commit message.

This revision is now accepted and ready to land.Mar 9 2021, 10:54 AM
This revision was landed with ongoing or failed builds.Mar 9 2021, 4:04 PM
This revision was automatically updated to reflect the committed changes.