This is an archive of the discontinued LLVM Phabricator instance.

Add zero-length check to memcpy/memset load store loop expansion
ClosedPublic

Authored by tejohnson on Jun 27 2017, 1:32 PM.

Details

Summary

I was testing using this expansion logic in other cases besides
NVPTX, and found some runtime failures due to the lack of a check
for a zero length memcpy/memset before the loop. There is already
such a check in the memmove expansion code though.

Event Timeline

tejohnson created this revision.Jun 27 2017, 1:32 PM
hfinkel accepted this revision.Jun 27 2017, 8:31 PM
hfinkel added a subscriber: hfinkel.

LGTM

This revision is now accepted and ready to land.Jun 27 2017, 8:31 PM
This revision was automatically updated to reflect the committed changes.