OSDN Git Service

[llvm-reduce] Fix incorrect indices in argument reduction pass
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Sun, 19 Jul 2020 16:24:57 +0000 (17:24 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Sun, 19 Jul 2020 17:06:47 +0000 (18:06 +0100)
commit6187eeb683d8c639282d437e6af585e9b7f9c93e
tree87a93f4cb0d795aa193bdf3cd39c8baf45c8dbdf
parent19dd3712e5ae6278656003b0734e4d83c72abf12
[llvm-reduce] Fix incorrect indices in argument reduction pass

The function extractArgumentsFromModule() was passing a one-based index to,
but replaceFunctionCalls() was expecting a zero-based argument index. This
resulted in assertion errors when reducing function call arguments with
different types. Additionally, the

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D84099
llvm/test/Reduce/remove-args-2.ll [new file with mode: 0644]
llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp