xref: /aosp_15_r20/external/llvm/test/Transforms/GVN/2009-03-10-PREOnVoid.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -gvn -disable-output
2*9880d681SAndroid Build Coastguard Worker; PR3775
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; ModuleID = 'bugpoint-reduced-simplified.bc'
5*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-f80:32:32"
6*9880d681SAndroid Build Coastguard Workertarget triple = "i386-pc-linux-gnu"
7*9880d681SAndroid Build Coastguard Worker	%llvm.dbg.anchor.type = type { i32, i32 }
8*9880d681SAndroid Build Coastguard Worker	%"struct.__gnu_cxx::hash<void*>" = type <{ i8 }>
9*9880d681SAndroid Build Coastguard Worker	%struct.__sched_param = type { i32 }
10*9880d681SAndroid Build Coastguard Worker	%struct._pthread_descr_struct = type opaque
11*9880d681SAndroid Build Coastguard Worker	%struct.pthread_attr_t = type { i32, i32, %struct.__sched_param, i32, i32, i32, i32, i8*, i32 }
12*9880d681SAndroid Build Coastguard Worker	%struct.pthread_mutex_t = type { i32, i32, %struct._pthread_descr_struct*, i32, %llvm.dbg.anchor.type }
13*9880d681SAndroid Build Coastguard Worker	%"struct.std::_Rb_tree<void*,std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > >,std::_Select1st<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >,std::less<void*>,std::allocator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > > >" = type { %"struct.std::_Rb_tree<void*,std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > >,std::_Select1st<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >,std::less<void*>,std::allocator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > > >::_Rb_tree_impl<std::less<void*>,false>" }
14*9880d681SAndroid Build Coastguard Worker	%"struct.std::_Rb_tree<void*,std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > >,std::_Select1st<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >,std::less<void*>,std::allocator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > > >::_Rb_tree_impl<std::less<void*>,false>" = type { %"struct.__gnu_cxx::hash<void*>", %"struct.std::_Rb_tree_node_base", i32 }
15*9880d681SAndroid Build Coastguard Worker	%"struct.std::_Rb_tree_iterator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >" = type { %"struct.std::_Rb_tree_node_base"* }
16*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"* }
17*9880d681SAndroid Build Coastguard Worker	%"struct.std::pair<std::_Rb_tree_iterator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >,bool>" = type { %"struct.std::_Rb_tree_iterator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >", i8 }
18*9880d681SAndroid Build Coastguard Worker	%"struct.std::pair<void* const,void*>" = type { i8*, i8* }
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker@_ZL20__gthrw_pthread_oncePiPFvvE = weak alias i32 (i32*, void ()*), i32 (i32*, void ()*)* @pthread_once		; <i32 (i32*, void ()*)*> [#uses=0]
21*9880d681SAndroid Build Coastguard Worker@_ZL27__gthrw_pthread_getspecificj = weak alias i8* (i32), i8* (i32)* @pthread_getspecific		; <i8* (i32)*> [#uses=0]
22*9880d681SAndroid Build Coastguard Worker@_ZL27__gthrw_pthread_setspecificjPKv = weak alias i32 (i32, i8*), i32 (i32, i8*)* @pthread_setspecific		; <i32 (i32, i8*)*> [#uses=0]
23*9880d681SAndroid Build Coastguard Worker@_ZL22__gthrw_pthread_createPmPK16__pthread_attr_sPFPvS3_ES3_ = weak alias i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*), i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)* @pthread_create		; <i32 (i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*)*> [#uses=0]
24*9880d681SAndroid Build Coastguard Worker@_ZL22__gthrw_pthread_cancelm = weak alias i32 (i32), i32 (i32)* @pthread_cancel		; <i32 (i32)*> [#uses=0]
25*9880d681SAndroid Build Coastguard Worker@_ZL26__gthrw_pthread_mutex_lockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_lock		; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
26*9880d681SAndroid Build Coastguard Worker@_ZL29__gthrw_pthread_mutex_trylockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_trylock		; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
27*9880d681SAndroid Build Coastguard Worker@_ZL28__gthrw_pthread_mutex_unlockP15pthread_mutex_t = weak alias i32 (%struct.pthread_mutex_t*), i32 (%struct.pthread_mutex_t*)* @pthread_mutex_unlock		; <i32 (%struct.pthread_mutex_t*)*> [#uses=0]
28*9880d681SAndroid Build Coastguard Worker@_ZL26__gthrw_pthread_mutex_initP15pthread_mutex_tPK19pthread_mutexattr_t = weak alias i32 (%struct.pthread_mutex_t*, %struct.__sched_param*), i32 (%struct.pthread_mutex_t*, %struct.__sched_param*)* @pthread_mutex_init		; <i32 (%struct.pthread_mutex_t*, %struct.__sched_param*)*> [#uses=0]
29*9880d681SAndroid Build Coastguard Worker@_ZL26__gthrw_pthread_key_createPjPFvPvE = weak alias i32 (i32*, void (i8*)*), i32 (i32*, void (i8*)*)* @pthread_key_create		; <i32 (i32*, void (i8*)*)*> [#uses=0]
30*9880d681SAndroid Build Coastguard Worker@_ZL26__gthrw_pthread_key_deletej = weak alias i32 (i32), i32 (i32)* @pthread_key_delete		; <i32 (i32)*> [#uses=0]
31*9880d681SAndroid Build Coastguard Worker@_ZL30__gthrw_pthread_mutexattr_initP19pthread_mutexattr_t = weak alias i32 (%struct.__sched_param*), i32 (%struct.__sched_param*)* @pthread_mutexattr_init		; <i32 (%struct.__sched_param*)*> [#uses=0]
32*9880d681SAndroid Build Coastguard Worker@_ZL33__gthrw_pthread_mutexattr_settypeP19pthread_mutexattr_ti = weak alias i32 (%struct.__sched_param*, i32), i32 (%struct.__sched_param*, i32)* @pthread_mutexattr_settype		; <i32 (%struct.__sched_param*, i32)*> [#uses=0]
33*9880d681SAndroid Build Coastguard Worker@_ZL33__gthrw_pthread_mutexattr_destroyP19pthread_mutexattr_t = weak alias i32 (%struct.__sched_param*), i32 (%struct.__sched_param*)* @pthread_mutexattr_destroy		; <i32 (%struct.__sched_param*)*> [#uses=0]
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Workerdeclare fastcc void @_ZNSt10_Select1stISt4pairIKPvS1_EEC1Ev() nounwind readnone
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard Workerdefine fastcc void @_ZNSt8_Rb_treeIPvSt4pairIKS0_S0_ESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE16_M_insert_uniqueERKS3_(%"struct.std::pair<std::_Rb_tree_iterator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >,bool>"* noalias nocapture sret %agg.result, %"struct.std::_Rb_tree<void*,std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > >,std::_Select1st<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > >,std::less<void*>,std::allocator<std::pair<void* const, std::vector<ShadowInfo, std::allocator<ShadowInfo> > > > >"* %this, %"struct.std::pair<void* const,void*>"* %__v) nounwind {
38*9880d681SAndroid Build Coastguard Workerentry:
39*9880d681SAndroid Build Coastguard Worker	br i1 false, label %bb7, label %bb
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Workerbb:		; preds = %bb, %entry
42*9880d681SAndroid Build Coastguard Worker	br i1 false, label %bb5, label %bb
43*9880d681SAndroid Build Coastguard Worker
44*9880d681SAndroid Build Coastguard Workerbb5:		; preds = %bb
45*9880d681SAndroid Build Coastguard Worker	call fastcc void @_ZNSt10_Select1stISt4pairIKPvS1_EEC1Ev() nounwind
46*9880d681SAndroid Build Coastguard Worker	br i1 false, label %bb11, label %bb7
47*9880d681SAndroid Build Coastguard Worker
48*9880d681SAndroid Build Coastguard Workerbb7:		; preds = %bb5, %entry
49*9880d681SAndroid Build Coastguard Worker	br label %bb11
50*9880d681SAndroid Build Coastguard Worker
51*9880d681SAndroid Build Coastguard Workerbb11:		; preds = %bb7, %bb5
52*9880d681SAndroid Build Coastguard Worker	call fastcc void @_ZNSt10_Select1stISt4pairIKPvS1_EEC1Ev() nounwind
53*9880d681SAndroid Build Coastguard Worker	unreachable
54*9880d681SAndroid Build Coastguard Worker}
55*9880d681SAndroid Build Coastguard Worker
56*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_once(i32*, void ()*) {
57*9880d681SAndroid Build Coastguard Worker       ret i32 0
58*9880d681SAndroid Build Coastguard Worker}
59*9880d681SAndroid Build Coastguard Worker
60*9880d681SAndroid Build Coastguard Workerdefine i8* @pthread_getspecific(i32) {
61*9880d681SAndroid Build Coastguard Worker       ret i8* null
62*9880d681SAndroid Build Coastguard Worker}
63*9880d681SAndroid Build Coastguard Worker
64*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_setspecific(i32, i8*) {
65*9880d681SAndroid Build Coastguard Worker        ret i32 0
66*9880d681SAndroid Build Coastguard Worker}
67*9880d681SAndroid Build Coastguard Worker
68*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_create(i32*, %struct.pthread_attr_t*, i8* (i8*)*, i8*) {
69*9880d681SAndroid Build Coastguard Worker       ret i32 0
70*9880d681SAndroid Build Coastguard Worker}
71*9880d681SAndroid Build Coastguard Worker
72*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_cancel(i32) {
73*9880d681SAndroid Build Coastguard Worker      ret i32 0
74*9880d681SAndroid Build Coastguard Worker}
75*9880d681SAndroid Build Coastguard Worker
76*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_mutex_lock(%struct.pthread_mutex_t*) {
77*9880d681SAndroid Build Coastguard Worker       ret i32 0
78*9880d681SAndroid Build Coastguard Worker}
79*9880d681SAndroid Build Coastguard Worker
80*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_mutex_trylock(%struct.pthread_mutex_t*) {
81*9880d681SAndroid Build Coastguard Worker       ret i32 0
82*9880d681SAndroid Build Coastguard Worker}
83*9880d681SAndroid Build Coastguard Worker
84*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_mutex_unlock(%struct.pthread_mutex_t*) {
85*9880d681SAndroid Build Coastguard Worker       ret i32 0
86*9880d681SAndroid Build Coastguard Worker}
87*9880d681SAndroid Build Coastguard Worker
88*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %struct.__sched_param*) {
89*9880d681SAndroid Build Coastguard Worker        ret i32 0
90*9880d681SAndroid Build Coastguard Worker}
91*9880d681SAndroid Build Coastguard Worker
92*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_key_create(i32*, void (i8*)*) {
93*9880d681SAndroid Build Coastguard Worker       ret i32 0
94*9880d681SAndroid Build Coastguard Worker}
95*9880d681SAndroid Build Coastguard Worker
96*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_key_delete(i32) {
97*9880d681SAndroid Build Coastguard Worker        ret i32 0
98*9880d681SAndroid Build Coastguard Worker}
99*9880d681SAndroid Build Coastguard Worker
100*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_mutexattr_init(%struct.__sched_param*) {
101*9880d681SAndroid Build Coastguard Worker        ret i32 0
102*9880d681SAndroid Build Coastguard Worker}
103*9880d681SAndroid Build Coastguard Worker
104*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_mutexattr_settype(%struct.__sched_param*, i32) {
105*9880d681SAndroid Build Coastguard Worker        ret i32 0
106*9880d681SAndroid Build Coastguard Worker}
107*9880d681SAndroid Build Coastguard Worker
108*9880d681SAndroid Build Coastguard Workerdefine i32 @pthread_mutexattr_destroy(%struct.__sched_param*) {
109*9880d681SAndroid Build Coastguard Worker       ret i32 0
110*9880d681SAndroid Build Coastguard Worker}
111