[IPSCCP][FuncSpec] Fix compiler crash 60191.
authorAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Mon, 23 Jan 2023 18:08:51 +0000 (18:08 +0000)
committerAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Tue, 24 Jan 2023 18:36:12 +0000 (18:36 +0000)
commit33ecc8a9b8b0584f13d849d7810e2fceca8d6be3
treef161105460285db1bc96f1f8f4f8db7b5a5ce5c9
parentc9c5a076b3916c4ce8de72469ea0d09365f2594a
[IPSCCP][FuncSpec] Fix compiler crash 60191.

Found here https://github.com/llvm/llvm-project/issues/60191

The compiler would crash when specializing a function based on a function
pointer whose call sites may expect less parameters than those of the
function we are replacing the pointer with.

Differential Revision: https://reviews.llvm.org/D142444
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
llvm/test/Transforms/FunctionSpecialization/compiler-crash-60191.ll [new file with mode: 0644]