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

25 lines
462 B
LLVM

; RUN: opt -S %s -passes=ipsccp | FileCheck %s
@a = internal global i32 2
define i32 @patatino() {
; CHECK: @patatino(
; CHECK: call void @f(i32 undef, i32 1)
; CHECK-NEXT: call void @f(i32 2, i32 0)
; CHECK-NEXT: ret i32 0
entry:
call void @f(i32 undef, i32 1)
%0 = load i32, i32* @a
call void @f(i32 %0, i32 0)
ret i32 0
}
define internal void @f(i32 %c, i32 %d) {
; CHECK: @f(
; CHECK: ret void
;
entry:
%cmp = icmp ne i32 %c, %d
ret void
}