[llvm-reduce] Skip updating calls where OldF isn't the called fn.
authorFlorian Hahn <flo@fhahn.com>
Fri, 1 Oct 2021 08:56:08 +0000 (09:56 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 1 Oct 2021 09:52:48 +0000 (10:52 +0100)
commit57fbb9ed0e4c9717b1106ce18f5653ce8f7136fa
treeab2372155f58be9cc0a25efa4573baff814cbde5
parent81d2cea6902e70c8c29b8b09f56d0c626e093a40
[llvm-reduce] Skip updating calls where OldF isn't the called fn.

When replacing function calls, skip call instructions where the old
function is not the called function, but e.g. the old function is passed
as an argument.

This fixes a crash due to trying to construct invalid IR for the test
case.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D109759
llvm/test/tools/llvm-reduce/remove-args-fn-passed-through-call.ll [new file with mode: 0644]
llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp