llvm-project/llvm/test/Transforms/GlobalOpt/pr52994.ll

18 lines
682 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; Check that aggregate stores work correctly.
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
@g = global { i64, i64 } poison
;.
; CHECK: @[[LLVM_GLOBAL_CTORS:[a-zA-Z0-9_$"\\.-]+]] = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = local_unnamed_addr global { i64, i64 } { i64 1, i64 2 }
;.
define internal void @ctor() {
store { i64, i64 } { i64 1, i64 2 }, { i64, i64 }* @g
ret void
}