This is an archive of the discontinued LLVM Phabricator instance.

Prevent store value forwarding to distinct addrspace load
ClosedPublic

Authored by dmitry on Dec 12 2021, 4:52 AM.

Details

Summary

DAGCombiner replaces (load const_addr1) directly chained with (store (val, const_addr2)) with val if address space stripped const_addr1 == const_addr2. The patch fixes the issue by checking address spaces as well.
However, it might makes sense to not to chain together side effects that belong to different address spaces in the first place and make SelectionDAG::root address space aware.

Diff Detail

Event Timeline

dmitry created this revision.Dec 12 2021, 4:52 AM
dmitry requested review of this revision.Dec 12 2021, 4:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2021, 4:52 AM
dmitry edited the summary of this revision. (Show Details)Dec 12 2021, 4:54 AM
arsenm accepted this revision.Dec 13 2021, 6:25 AM
This revision is now accepted and ready to land.Dec 13 2021, 6:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 29 2022, 3:20 PM