1 ; Check if "RtLibUseGOT" works correctly when lib calls are simplified.
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 @percent_s = constant [4 x i8] c"%s\0A\00"
5 @hello_world = constant [13 x i8] c"hello world\0A\00"
6 declare i32 @printf(i8*, ...)
7 define void @printf_call() {
8 %fmt = getelementptr [4 x i8], [4 x i8]* @percent_s, i32 0, i32 0
9 %str = getelementptr [13 x i8], [13 x i8]* @hello_world, i32 0, i32 0
10 call i32 (i8*, ...) @printf(i8* %fmt, i8* %str)
11 ; CHECK: call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @hello_world, i64 0, i64 0))
15 ; CHECK: Function Attrs: nofree nounwind nonlazybind
16 ; CHECK-NEXT: declare i32 @puts(i8* nocapture readonly)
18 !llvm.module.flags = !{!0}
19 !0 = !{i32 7, !"RtLibUseGOT", i32 1}