xref: /aosp_15_r20/external/llvm/test/Transforms/GlobalOpt/2007-06-04-PackedStruct.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -globalopt -disable-output
2*9880d681SAndroid Build Coastguard Worker; PR1491
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
5*9880d681SAndroid Build Coastguard Workertarget triple = "i686-pc-linux-gnu"
6*9880d681SAndroid Build Coastguard Worker	%"struct.__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const int, int> > >" = type <{ i8 }>
7*9880d681SAndroid Build Coastguard Worker	%"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >" = type { %"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >::_Rb_tree_impl<std::less<int>,false>" }
8*9880d681SAndroid Build Coastguard Worker	%"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >::_Rb_tree_impl<std::less<int>,false>" = type { %"struct.__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const int, int> > >", %"struct.std::_Rb_tree_node_base", i32 }
9*9880d681SAndroid Build Coastguard Worker	%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
10*9880d681SAndroid Build Coastguard Worker	%"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >" = type { %"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >" }
11*9880d681SAndroid Build Coastguard Worker@someMap = global %"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >" zeroinitializer		; <%"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >"*> [#uses=1]
12*9880d681SAndroid Build Coastguard Worker@llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_someMap } ]		; <[1 x { i32, void ()* }]*> [#uses=0]
13*9880d681SAndroid Build Coastguard Worker@llvm.global_dtors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__D_someMap } ]		; <[1 x { i32, void ()* }]*> [#uses=0]
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Workerdefine void @_GLOBAL__I_someMap() {
16*9880d681SAndroid Build Coastguard Workerentry:
17*9880d681SAndroid Build Coastguard Worker	call void @_Z41__static_initialization_and_destruction_0ii( i32 1, i32 65535 )
18*9880d681SAndroid Build Coastguard Worker	ret void
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Workerdeclare void @_GLOBAL__D_someMap()
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Workerdefine void @_Z41__static_initialization_and_destruction_0ii(i32 %__initialize_p, i32 %__priority) {
24*9880d681SAndroid Build Coastguard Workerentry:
25*9880d681SAndroid Build Coastguard Worker	%tmp1 = icmp eq i32 %__priority, 65535		; <i1> [#uses=1]
26*9880d681SAndroid Build Coastguard Worker	%tmp4 = icmp eq i32 %__initialize_p, 1		; <i1> [#uses=1]
27*9880d681SAndroid Build Coastguard Worker	%tmp7 = and i1 %tmp1, %tmp4		; <i1> [#uses=1]
28*9880d681SAndroid Build Coastguard Worker	br i1 %tmp7, label %cond_true, label %cond_next
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Workercond_true:		; preds = %entry
31*9880d681SAndroid Build Coastguard Worker	store i8 0, i8* getelementptr (%"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >", %"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >"* @someMap, i32 0, i32 0, i32 0, i32 0, i32 0)
32*9880d681SAndroid Build Coastguard Worker	ret void
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Workercond_next:		; preds = %entry
35*9880d681SAndroid Build Coastguard Worker	ret void
36*9880d681SAndroid Build Coastguard Worker}
37