This is an archive of the discontinued LLVM Phabricator instance.

[MergeFuncs] Remove incorrect attribute copying
ClosedPublic

Authored by nikic on Dec 8 2019, 3:19 AM.

Details

Summary

Fix for https://bugs.llvm.org/show_bug.cgi?id=44236. This code was originally introduced in rG36512330041201e10f5429361bbd79b1afac1ea1. However, the attribute copying was done in the wrong place (in general call replacement, not thunk generation) and a proper fix was implemented in D12581.

Previously this code was just unnecessary but harmless (because FunctionComparator ensured that the attributes of the two functions are exactly the same), but since byval was changed to accept a type this copying is actively wrong and may result in malformed IR.

Diff Detail

Event Timeline

nikic created this revision.Dec 8 2019, 3:19 AM
nikic edited the summary of this revision. (Show Details)Dec 8 2019, 3:20 AM
vsk accepted this revision.Dec 9 2019, 9:58 AM

Thanks, lgtm.

This revision is now accepted and ready to land.Dec 9 2019, 9:58 AM
This revision was automatically updated to reflect the committed changes.