Nikita Popov f3a113ff48 [TLI] Fix signature for fprintf (PR59757)
fprintf() requires two pointer arguments.

Fixes https://github.com/llvm/llvm-project/issues/59757.
2023-01-03 15:28:47 +01:00

16 lines
434 B
LLVM

; 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
}