Bjorn Pettersson 8ebb3eac02 [test] Use -passes syntax when specifying pipeline in some more tests
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
2021-11-27 09:52:55 +01:00

26 lines
467 B
LLVM

; RUN: opt -passes=print-predicateinfo < %s 2>&1 | FileCheck %s
declare void @foo()
declare void @llvm.assume(i1)
define void @bar(i32* %p) {
entry:
; CHECK-LABEL: @bar
br label %end
unreachable1:
%v1 = load i32, i32* %p, align 4
%c1 = icmp eq i32 %v1, 0
call void @llvm.assume(i1 %c1)
br label %unreachable2
unreachable2:
%v2 = load i32, i32* %p, align 4
%c2 = icmp eq i32 %v2, 0
call void @llvm.assume(i1 %c2)
br label %end
end:
ret void
}