blob: b6c5299ae7dc4b2ac2cd32820b8b5b31d68d3677 [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -ipsccp -S | FileCheck %s
; Should not propagate the result of a weak function.
; PR2411
define weak i32 @foo() nounwind {
; CHECK-LABEL: @foo(
; CHECK-NEXT: entry:
; CHECK-NEXT: ret i32 1
;
entry:
ret i32 1
}
define i32 @main() nounwind {
; CHECK-LABEL: @main(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[R:%.*]] = call i32 @foo() #0
; CHECK-NEXT: ret i32 [[R]]
;
entry:
%r = call i32 @foo( ) nounwind
ret i32 %r
}