26 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=ipsccp -S | FileCheck %s3; Should not propagate the result of a weak function.4; PR24115 6define weak i32 @foo() nounwind {7; CHECK-LABEL: @foo(8; CHECK-NEXT: entry:9; CHECK-NEXT: ret i32 110;11entry:12 ret i32 113}14 15define i32 @main() nounwind {16; CHECK-LABEL: @main(17; CHECK-NEXT: entry:18; CHECK-NEXT: [[R:%.*]] = call i32 @foo() #019; CHECK-NEXT: ret i32 [[R]]20;21entry:22 %r = call i32 @foo( ) nounwind23 ret i32 %r24}25 26