2012-12-30 10:33:22 +08:00
|
|
|
; RUN: opt -instcombine -S < %s | llvm-as
|
|
|
|
; RUN: opt -instcombine -globalopt -S < %s | llvm-as
|
2011-12-05 14:29:09 +08:00
|
|
|
@G1 = global i32 zeroinitializer
|
|
|
|
@G2 = global i32 zeroinitializer
|
|
|
|
@g = global <2 x i32*> zeroinitializer
|
2019-05-15 10:35:32 +08:00
|
|
|
%0 = type { i32, void ()*, i8* }
|
|
|
|
@llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()* @test, i8* null }]
|
2011-12-05 14:29:09 +08:00
|
|
|
define internal void @test() {
|
|
|
|
%A = insertelement <2 x i32*> undef, i32* @G1, i32 0
|
|
|
|
%B = insertelement <2 x i32*> %A, i32* @G2, i32 1
|
|
|
|
store <2 x i32*> %B, <2 x i32*>* @g
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|