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
594 B
LLVM
17 lines
594 B
LLVM
; RUN: opt < %s -passes=globalopt -S | FileCheck %s
|
|
|
|
; Test that when all members of llvm.compiler.used are found to be redundant
|
|
; we delete it instead of crashing.
|
|
|
|
define void @foo() {
|
|
ret void
|
|
}
|
|
|
|
@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
|
|
|
|
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
|
|
|
|
; CHECK-NOT: @llvm.compiler.used
|
|
; CHECK: @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
|
|
; CHECK-NOT: @llvm.compiler.used
|