This is an archive of the discontinued LLVM Phabricator instance.

[MemCpyOpt] Don't fold memcpy.inline into memmove
ClosedPublic

Authored by miyuki on Mar 29 2023, 8:14 AM.

Details

Summary

The llvm.memcpy.inline intrinsic must be expanded into code that
does not contain any function calls because it is intended for
the implementation of low-level functions like memcpy. Currently the
MemCpyOpt might covert llvm.memcpy.inline into llvm.memmove in
certain circumstances. This patch fixes the issue.

Fixes https://github.com/llvm/llvm-project/issues/61791.

Diff Detail

Event Timeline

miyuki created this revision.Mar 29 2023, 8:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 8:14 AM
miyuki requested review of this revision.Mar 29 2023, 8:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 8:14 AM
miyuki edited the summary of this revision. (Show Details)Mar 29 2023, 8:15 AM
nikic accepted this revision.Mar 30 2023, 2:24 AM

LGTM

This revision is now accepted and ready to land.Mar 30 2023, 2:24 AM

CI failures look unrelated.

This revision was landed with ongoing or failed builds.Mar 30 2023, 5:15 AM
This revision was automatically updated to reflect the committed changes.

Thx a lot for the fix!