This is an archive of the discontinued LLVM Phabricator instance.

[DSE] Handle memmove with equal non-const sizes
ClosedPublic

Authored by xbolva00 on Mar 10 2021, 6:26 AM.

Details

Summary

Follow up for fhahn's D98284. Also fixes a case from PR47644.

Diff Detail

Event Timeline

xbolva00 created this revision.Mar 10 2021, 6:26 AM
xbolva00 requested review of this revision.Mar 10 2021, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2021, 6:26 AM
xbolva00 edited the summary of this revision. (Show Details)Mar 10 2021, 6:27 AM
nikic added a subscriber: nikic.Mar 10 2021, 6:35 AM
nikic added inline comments.
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
375–376

Use dyn_cast<MemIntrinsic> + getLength() instead?

xbolva00 updated this revision to Diff 329679.Mar 10 2021, 8:30 AM

Updated, thanks @nikic

llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
375–376

good idea!

fhahn accepted this revision.Mar 10 2021, 8:37 AM

Neat, LGTM, thanks!

This revision is now accepted and ready to land.Mar 10 2021, 8:37 AM
xbolva00 updated this revision to Diff 329682.Mar 10 2021, 8:50 AM

Added 2 tests for memcpy/memmove combo.

This revision was landed with ongoing or failed builds.Mar 10 2021, 8:52 AM
This revision was automatically updated to reflect the committed changes.