fprintf() requires two pointer arguments.
Fixes https://github.com/llvm/llvm-project/issues/59757.
/// int fprintf(FILE *stream, const char *format, ...);
TLI_DEFINE_ENUM_INTERNAL(fprintf)
TLI_DEFINE_STRING_INTERNAL("fprintf")
-TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ellip)
+TLI_DEFINE_SIG_INTERNAL(Int, Ptr, Ptr, Ellip)
/// int fputc(int c, FILE *stream);
TLI_DEFINE_ENUM_INTERNAL(fputc)
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -passes=instcombine < %s | FileCheck %s
+
+@.str = private constant [13 x i8] c"an error: %d\00"
+
+declare i32 @fprintf(ptr, ...)
+
+define i32 @test1() {
+; CHECK-LABEL: @test1(
+; CHECK-NEXT: [[CALL:%.*]] = call i32 (ptr, ...) @fprintf(ptr nonnull @.str)
+; CHECK-NEXT: ret i32 0
+;
+ %call = call i32 (ptr, ...) @fprintf(ptr @.str)
+ ret i32 0
+}