1 ; RUN: opt < %s -simplify-libcalls -S | FileCheck %s
4 ; SimplifyLibcalls shouldn't assume anything about weak symbols.
6 @real_init = weak_odr constant [2 x i8] c"y\00"
7 @fake_init = weak constant [2 x i8] c"y\00"
8 @.str = private constant [2 x i8] c"y\00"
10 ; CHECK: define i32 @foo
11 ; CHECK: call i32 @strcmp
12 define i32 @foo() nounwind {
14 %t0 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8]* @fake_init, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8]* @.str, i64 0, i64 0)) nounwind readonly
18 ; CHECK: define i32 @bar
20 define i32 @bar() nounwind {
22 %t0 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8]* @real_init, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8]* @.str, i64 0, i64 0)) nounwind readonly
26 declare i32 @strcmp(i8*, i8*) nounwind readonly