Files
clang-p2996/llvm/test/Transforms/GlobalOpt/amdgcn-ctor-alloca.ll
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

18 lines
577 B
LLVM

; RUN: opt -data-layout=A5 -passes=globalopt %s -S -o - | FileCheck %s
; CHECK-NOT: @g
@g = internal addrspace(1) global i32* zeroinitializer
; CHECK: @llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }]
[{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
; CHECK-NOT: @ctor
define internal void @ctor() {
%addr = alloca i32, align 8, addrspace(5)
%tmp = addrspacecast i32 addrspace(5)* %addr to i32*
store i32* %tmp, i32* addrspace(1)* @g
ret void
}