[Attributor][FIX] Avoid creating accidental poison callees
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 12 Jan 2023 10:08:07 +0000 (02:08 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 12 Jan 2023 10:13:08 +0000 (02:13 -0800)
commit5d64ad85446b3edbc0c5bbae97809e28873f3161
tree789ba3b4ad4a09e30802fe0b2eb78d7350d03a34
parent01e8e50ce397dcb08e7dfadab93a53ae31174c67
[Attributor][FIX] Avoid creating accidental poison callees

Back with f3ad8cf00e213 we introduced a bug that caused us to skip
callees when we replace uses. This is not sound since subsequent IR
cleanup will assume replacement has happend. As such we created poison
callees for a long while. The original intend of the check was to
prevent call graph invalidation, however, we now properly check if the
instructions (here the call) are inside the SCC or not.
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/liveness.ll
llvm/test/Transforms/Attributor/value-simplify.ll