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
17 lines
411 B
LLVM
17 lines
411 B
LLVM
; RUN: opt -S < %s -passes=globalopt | FileCheck %s
|
|
|
|
; Static evaluation across a @llvm.sideeffect.
|
|
|
|
; CHECK-NOT: store
|
|
|
|
declare void @llvm.sideeffect()
|
|
|
|
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [ { i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null } ]
|
|
@G = global i32 0
|
|
|
|
define internal void @ctor() {
|
|
store i32 1, i32* @G
|
|
call void @llvm.sideeffect()
|
|
ret void
|
|
}
|