This is an archive of the discontinued LLVM Phabricator instance.

[GVN] Fix MemorySSA update when replacing assume(false) with stores.
ClosedPublic

Authored by fhahn on Nov 4 2020, 12:18 PM.

Details

Summary

When replacing an assume(false) with a store, we have to be more careful
with the order we insert the new access. This patch updates the code to
look at the accesses in the block to find a suitable insertion point.

Alterantively we could check the defining access of the assume, but IIRC
there has been some discussion about making assume() readnone, so
looking at the access list might be more future proof.

Fixes PR48072.

Diff Detail

Event Timeline

fhahn created this revision.Nov 4 2020, 12:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2020, 12:18 PM
fhahn requested review of this revision.Nov 4 2020, 12:18 PM
asbirlea accepted this revision.Nov 4 2020, 6:30 PM

Thank you for the fix.

This revision is now accepted and ready to land.Nov 4 2020, 6:30 PM
uabelho added a subscriber: uabelho.Nov 4 2020, 9:49 PM
This revision was landed with ongoing or failed builds.Nov 5 2020, 4:11 AM
This revision was automatically updated to reflect the committed changes.