This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] set dereferenceable flag in MergeConsecutiveStores to fix assetion failure
ClosedPublic

Authored by inouehrs on Jun 27 2017, 4:15 AM.

Details

Summary

When SelectionDAG merges consecutive stores and loads in MergeConsecutiveStores, it does not set dereferenceable flag for a created load instruction. This results in an assertion failure if SelectionDAG commonizes this load instruction with other load instructions, as well as it may miss optimization opportunities.

This patch sat dereferenceable flag for the newly created load instruction if all the load instruction to be merged are dereferenceable.

Diff Detail

Repository
rL LLVM

Event Timeline

inouehrs created this revision.Jun 27 2017, 4:15 AM
hfinkel accepted this revision.Jun 27 2017, 4:47 AM

LGTM

This revision is now accepted and ready to land.Jun 27 2017, 4:47 AM
This revision was automatically updated to reflect the committed changes.