brintos

brintos / llvm-project-archived public Read only

0
0
Text · 728 B · 16cb049 Raw
30 lines · plain
1; PR4738 - Test that the library call simplifier doesn't assume anything about2; weak symbols.3;4; RUN: opt < %s -passes=instcombine -S | FileCheck %s5 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"9 10define i32 @foo() nounwind {11; CHECK-LABEL: define i32 @foo(12; CHECK: call i32 @strcmp13; CHECK: ret i32 %temp114 15entry:16  %temp1 = call i32 @strcmp(ptr @fake_init, ptr @.str) nounwind readonly17  ret i32 %temp118}19 20define i32 @bar() nounwind {21; CHECK-LABEL: define i32 @bar(22; CHECK: ret i32 023 24entry:25  %temp1 = call i32 @strcmp(ptr @real_init, ptr @.str) nounwind readonly26  ret i32 %temp127}28 29declare i32 @strcmp(ptr, ptr) nounwind readonly30