1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt < %s -ipsccp -S | FileCheck %s 3; Should not propagate the result of a weak function. 4; PR2411 5 6define weak i32 @foo() nounwind { 7; CHECK-LABEL: @foo( 8; CHECK-NEXT: entry: 9; CHECK-NEXT: ret i32 1 10; 11entry: 12 ret i32 1 13} 14 15define i32 @main() nounwind { 16; CHECK-LABEL: @main( 17; CHECK-NEXT: entry: 18; CHECK-NEXT: [[R:%.*]] = call i32 @foo() #0 19; CHECK-NEXT: ret i32 [[R]] 20; 21entry: 22 %r = call i32 @foo( ) nounwind 23 ret i32 %r 24} 25 26