This is an archive of the discontinued LLVM Phabricator instance.

Check dominance tree before lifting memcpy in MemCpyOpt
AbandonedPublic

Authored by deadalnix on Jan 7 2016, 3:31 AM.

Details

Summary

The load to store forwarding of aggregate to memcpy transformation can create faulty IR. This happens when the memecpy would be materialized before the argument of the store.

This diff add a check so that dominance tree remains correct.

Diff Detail

Event Timeline

deadalnix updated this revision to Diff 44202.Jan 7 2016, 3:31 AM
deadalnix retitled this revision from to Check dominance tree before lifting memcpy in MemCpyOpt.
deadalnix updated this object.
deadalnix added a subscriber: llvm-commits.
Prazek edited edge metadata.Jan 11 2016, 11:10 PM

Do you have any other test case? I don't see that change of the label in the test will pick this case up.

deadalnix abandoned this revision.Jan 12 2016, 7:12 AM

I don't think this pays for itself. I'll come up with something buffed up here.