[Attributor][FIX] Disallow function signature rewrite for casted calls
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 11 May 2020 20:22:14 +0000 (15:22 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Mon, 11 May 2020 20:32:47 +0000 (15:32 -0500)
commit8d94d3c3b44c3a27a69b153cef9be4b8e481150e
tree931af284162e86a4dc1883ff1dd2eec198356a2f
parentc115a78f0d2ac59b6f53634fd057f45211e04a96
[Attributor][FIX] Disallow function signature rewrite for casted calls

We will now ensure ensure the return type of called function is the type
of all call sites we are going to rewrite. This avoids a problem
partially fixed by D79680. The part that was not covered is a use of
this "weird" casted call site (see `@func3` in `misc_crash.ll`).

misc_crash.ll checks are auto-generated now.
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/misc_crash.ll