
The legacy PM is deprecated, so update a bunch of lit tests running opt to use the new PM syntax when specifying the pipeline. In this patch focus has been put on test cases for ConstantMerge, ConstraintElimination, CorrelatedValuePropagation, GlobalDCE, GlobalOpt, SCCP, TailCallElim and PredicateInfo. Differential Revision: https://reviews.llvm.org/D114516
26 lines
528 B
LLVM
26 lines
528 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -passes=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
|
|
}
|
|
|