
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
34 lines
830 B
LLVM
34 lines
830 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -passes=ipsccp -S %s | FileCheck %s
|
|
|
|
declare i1 @cond()
|
|
|
|
define i32 @test() {
|
|
; CHECK-LABEL: @test(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: br label [[LOOP:%.*]]
|
|
; CHECK: loop:
|
|
; CHECK-NEXT: [[C_1:%.*]] = call i1 @cond()
|
|
; CHECK-NEXT: br i1 [[C_1]], label [[LOOP]], label [[LATCH_2:%.*]]
|
|
; CHECK: latch.2:
|
|
; CHECK-NEXT: [[C_2:%.*]] = call i1 @cond()
|
|
; CHECK-NEXT: br i1 [[C_2]], label [[LOOP]], label [[EXIT:%.*]]
|
|
; CHECK: exit:
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
entry:
|
|
br label %loop
|
|
|
|
loop:
|
|
%p = phi i32 [ undef, %entry ], [ 0, %latch.2 ], [ %p, %loop]
|
|
%c.1 = call i1 @cond()
|
|
br i1 %c.1, label %loop, label %latch.2
|
|
|
|
latch.2:
|
|
%c.2 = call i1 @cond()
|
|
br i1 %c.2, label %loop, label %exit
|
|
|
|
exit:
|
|
ret i32 %p
|
|
}
|