This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Don't simplify musttail calls
ClosedPublic

Authored by nikic on Mar 8 2020, 6:20 AM.

Details

Summary

As pointed out by @jdoerfert on D75815, we must be careful when simplifying musttail calls: We can only replace the return value if we can eliminate the call entirely. As we can't make this guarantee for all consumers of InstSimplify, this patch disables simplification of musttail calls. Without this patch, musttail simplification currently results in module verification errors.

Diff Detail

Event Timeline

nikic created this revision.Mar 8 2020, 6:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2020, 6:20 AM
jdoerfert accepted this revision.Mar 8 2020, 10:32 AM

LGTM. Removing must-tail properly needs more logic so not doing it here is sensible.

This revision is now accepted and ready to land.Mar 8 2020, 10:32 AM
This revision was automatically updated to reflect the committed changes.