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.
Fixes #60191
Is it okay if the arguments have different types? (If no, then you'll want to compare getFunctionType()).