1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck --check-prefix=IC %s
3 ; RUN: opt < %s -instcombine -sroa -S | FileCheck --check-prefix=IC_SROA %s
6 ; Instcombine shouldn't do anything to this function that prevents promoting the allocas inside it.
8 target 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:128:128"
9 target triple = "i386-apple-darwin9.6"
11 %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >" = type { i32* }
12 %"struct.std::_Vector_base<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" }
13 %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" = type { i32*, i32*, i32* }
14 %"struct.std::bidirectional_iterator_tag" = type <{ i8 }>
15 %"struct.std::forward_iterator_tag" = type <{ i8 }>
16 %"struct.std::input_iterator_tag" = type <{ i8 }>
17 %"struct.std::random_access_iterator_tag" = type <{ i8 }>
18 %"struct.std::vector<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >" }
20 define i32* @_Z3fooRSt6vectorIiSaIiEE(%"struct.std::vector<int,std::allocator<int> >"* %X) {
21 ; IC-LABEL: @_Z3fooRSt6vectorIiSaIiEE(
23 ; IC-NEXT: [[__FIRST_ADDR_I_I:%.*]] = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", align 8
24 ; IC-NEXT: [[__LAST_ADDR_I_I:%.*]] = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", align 8
25 ; IC-NEXT: [[TMP0:%.*]] = alloca i32, align 4
26 ; IC-NEXT: store i32 42, i32* [[TMP0]], align 4
27 ; IC-NEXT: [[TMP1:%.*]] = getelementptr %"struct.std::vector<int,std::allocator<int> >", %"struct.std::vector<int,std::allocator<int> >"* [[X:%.*]], i32 0, i32 0, i32 0, i32 1
28 ; IC-NEXT: [[TMP2:%.*]] = load i32*, i32** [[TMP1]], align 4
29 ; IC-NEXT: [[TMP3:%.*]] = getelementptr %"struct.std::vector<int,std::allocator<int> >", %"struct.std::vector<int,std::allocator<int> >"* [[X]], i32 0, i32 0, i32 0, i32 0
30 ; IC-NEXT: [[TMP4:%.*]] = load i32*, i32** [[TMP3]], align 4
31 ; IC-NEXT: [[TMP5:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
32 ; IC-NEXT: store i32* [[TMP4]], i32** [[TMP5]], align 8
33 ; IC-NEXT: [[TMP6:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__LAST_ADDR_I_I]], i32 0, i32 0
34 ; IC-NEXT: store i32* [[TMP2]], i32** [[TMP6]], align 8
35 ; IC-NEXT: [[TMP7:%.*]] = ptrtoint i32* [[TMP2]] to i32
36 ; IC-NEXT: [[TMP8:%.*]] = ptrtoint i32* [[TMP4]] to i32
37 ; IC-NEXT: [[TMP9:%.*]] = sub i32 [[TMP7]], [[TMP8]]
38 ; IC-NEXT: [[TMP10:%.*]] = ashr i32 [[TMP9]], 4
39 ; IC-NEXT: br label [[BB12_I_I:%.*]]
41 ; IC-NEXT: [[TMP11:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
42 ; IC-NEXT: [[TMP12:%.*]] = load i32*, i32** [[TMP11]], align 8
43 ; IC-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4
44 ; IC-NEXT: [[TMP14:%.*]] = load i32, i32* [[TMP0]], align 4
45 ; IC-NEXT: [[TMP15:%.*]] = icmp eq i32 [[TMP13]], [[TMP14]]
46 ; IC-NEXT: br i1 [[TMP15]], label [[BB1_I_I:%.*]], label [[BB2_I_I:%.*]]
48 ; IC-NEXT: [[TMP16:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
49 ; IC-NEXT: [[TMP17:%.*]] = load i32*, i32** [[TMP16]], align 8
50 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT:%.*]]
52 ; IC-NEXT: [[TMP18:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
53 ; IC-NEXT: [[TMP19:%.*]] = load i32*, i32** [[TMP18]], align 8
54 ; IC-NEXT: [[TMP20:%.*]] = getelementptr i32, i32* [[TMP19]], i32 1
55 ; IC-NEXT: [[TMP21:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
56 ; IC-NEXT: store i32* [[TMP20]], i32** [[TMP21]], align 8
57 ; IC-NEXT: [[TMP22:%.*]] = load i32, i32* [[TMP20]], align 4
58 ; IC-NEXT: [[TMP23:%.*]] = load i32, i32* [[TMP0]], align 4
59 ; IC-NEXT: [[TMP24:%.*]] = icmp eq i32 [[TMP22]], [[TMP23]]
60 ; IC-NEXT: br i1 [[TMP24]], label [[BB4_I_I:%.*]], label [[BB5_I_I:%.*]]
62 ; IC-NEXT: [[TMP25:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
63 ; IC-NEXT: [[TMP26:%.*]] = load i32*, i32** [[TMP25]], align 8
64 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
66 ; IC-NEXT: [[TMP27:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
67 ; IC-NEXT: [[TMP28:%.*]] = load i32*, i32** [[TMP27]], align 8
68 ; IC-NEXT: [[TMP29:%.*]] = getelementptr i32, i32* [[TMP28]], i32 1
69 ; IC-NEXT: [[TMP30:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
70 ; IC-NEXT: store i32* [[TMP29]], i32** [[TMP30]], align 8
71 ; IC-NEXT: [[TMP31:%.*]] = load i32, i32* [[TMP29]], align 4
72 ; IC-NEXT: [[TMP32:%.*]] = load i32, i32* [[TMP0]], align 4
73 ; IC-NEXT: [[TMP33:%.*]] = icmp eq i32 [[TMP31]], [[TMP32]]
74 ; IC-NEXT: br i1 [[TMP33]], label [[BB7_I_I:%.*]], label [[BB8_I_I:%.*]]
76 ; IC-NEXT: [[TMP34:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
77 ; IC-NEXT: [[TMP35:%.*]] = load i32*, i32** [[TMP34]], align 8
78 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
80 ; IC-NEXT: [[TMP36:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
81 ; IC-NEXT: [[TMP37:%.*]] = load i32*, i32** [[TMP36]], align 8
82 ; IC-NEXT: [[TMP38:%.*]] = getelementptr i32, i32* [[TMP37]], i32 1
83 ; IC-NEXT: [[TMP39:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
84 ; IC-NEXT: store i32* [[TMP38]], i32** [[TMP39]], align 8
85 ; IC-NEXT: [[TMP40:%.*]] = load i32, i32* [[TMP38]], align 4
86 ; IC-NEXT: [[TMP41:%.*]] = load i32, i32* [[TMP0]], align 4
87 ; IC-NEXT: [[TMP42:%.*]] = icmp eq i32 [[TMP40]], [[TMP41]]
88 ; IC-NEXT: br i1 [[TMP42]], label [[BB10_I_I:%.*]], label [[BB11_I_I:%.*]]
90 ; IC-NEXT: [[TMP43:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
91 ; IC-NEXT: [[TMP44:%.*]] = load i32*, i32** [[TMP43]], align 8
92 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
94 ; IC-NEXT: [[TMP45:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
95 ; IC-NEXT: [[TMP46:%.*]] = load i32*, i32** [[TMP45]], align 8
96 ; IC-NEXT: [[TMP47:%.*]] = getelementptr i32, i32* [[TMP46]], i32 1
97 ; IC-NEXT: [[TMP48:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
98 ; IC-NEXT: store i32* [[TMP47]], i32** [[TMP48]], align 8
99 ; IC-NEXT: [[TMP49:%.*]] = add i32 [[__TRIP_COUNT_0_I_I:%.*]], -1
100 ; IC-NEXT: br label [[BB12_I_I]]
102 ; IC-NEXT: [[__TRIP_COUNT_0_I_I]] = phi i32 [ [[TMP10]], [[ENTRY:%.*]] ], [ [[TMP49]], [[BB11_I_I]] ]
103 ; IC-NEXT: [[TMP50:%.*]] = icmp sgt i32 [[__TRIP_COUNT_0_I_I]], 0
104 ; IC-NEXT: br i1 [[TMP50]], label [[BB_I_I:%.*]], label [[BB13_I_I:%.*]]
106 ; IC-NEXT: [[TMP51:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__LAST_ADDR_I_I]], i32 0, i32 0
107 ; IC-NEXT: [[TMP52:%.*]] = load i32*, i32** [[TMP51]], align 8
108 ; IC-NEXT: [[TMP53:%.*]] = ptrtoint i32* [[TMP52]] to i32
109 ; IC-NEXT: [[TMP54:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
110 ; IC-NEXT: [[TMP55:%.*]] = load i32*, i32** [[TMP54]], align 8
111 ; IC-NEXT: [[TMP56:%.*]] = ptrtoint i32* [[TMP55]] to i32
112 ; IC-NEXT: [[TMP57:%.*]] = sub i32 [[TMP53]], [[TMP56]]
113 ; IC-NEXT: [[TMP58:%.*]] = ashr i32 [[TMP57]], 2
114 ; IC-NEXT: switch i32 [[TMP58]], label [[BB26_I_I:%.*]] [
115 ; IC-NEXT: i32 1, label [[BB22_I_I:%.*]]
116 ; IC-NEXT: i32 2, label [[BB18_I_I:%.*]]
117 ; IC-NEXT: i32 3, label [[BB14_I_I:%.*]]
120 ; IC-NEXT: [[TMP59:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
121 ; IC-NEXT: [[TMP60:%.*]] = load i32*, i32** [[TMP59]], align 8
122 ; IC-NEXT: [[TMP61:%.*]] = load i32, i32* [[TMP60]], align 4
123 ; IC-NEXT: [[TMP62:%.*]] = load i32, i32* [[TMP0]], align 4
124 ; IC-NEXT: [[TMP63:%.*]] = icmp eq i32 [[TMP61]], [[TMP62]]
125 ; IC-NEXT: br i1 [[TMP63]], label [[BB16_I_I:%.*]], label [[BB17_I_I:%.*]]
127 ; IC-NEXT: [[TMP64:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
128 ; IC-NEXT: [[TMP65:%.*]] = load i32*, i32** [[TMP64]], align 8
129 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
131 ; IC-NEXT: [[TMP66:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
132 ; IC-NEXT: [[TMP67:%.*]] = load i32*, i32** [[TMP66]], align 8
133 ; IC-NEXT: [[TMP68:%.*]] = getelementptr i32, i32* [[TMP67]], i32 1
134 ; IC-NEXT: [[TMP69:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
135 ; IC-NEXT: store i32* [[TMP68]], i32** [[TMP69]], align 8
136 ; IC-NEXT: br label [[BB18_I_I]]
138 ; IC-NEXT: [[TMP70:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
139 ; IC-NEXT: [[TMP71:%.*]] = load i32*, i32** [[TMP70]], align 8
140 ; IC-NEXT: [[TMP72:%.*]] = load i32, i32* [[TMP71]], align 4
141 ; IC-NEXT: [[TMP73:%.*]] = load i32, i32* [[TMP0]], align 4
142 ; IC-NEXT: [[TMP74:%.*]] = icmp eq i32 [[TMP72]], [[TMP73]]
143 ; IC-NEXT: br i1 [[TMP74]], label [[BB20_I_I:%.*]], label [[BB21_I_I:%.*]]
145 ; IC-NEXT: [[TMP75:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
146 ; IC-NEXT: [[TMP76:%.*]] = load i32*, i32** [[TMP75]], align 8
147 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
149 ; IC-NEXT: [[TMP77:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
150 ; IC-NEXT: [[TMP78:%.*]] = load i32*, i32** [[TMP77]], align 8
151 ; IC-NEXT: [[TMP79:%.*]] = getelementptr i32, i32* [[TMP78]], i32 1
152 ; IC-NEXT: [[TMP80:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
153 ; IC-NEXT: store i32* [[TMP79]], i32** [[TMP80]], align 8
154 ; IC-NEXT: br label [[BB22_I_I]]
156 ; IC-NEXT: [[TMP81:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
157 ; IC-NEXT: [[TMP82:%.*]] = load i32*, i32** [[TMP81]], align 8
158 ; IC-NEXT: [[TMP83:%.*]] = load i32, i32* [[TMP82]], align 4
159 ; IC-NEXT: [[TMP84:%.*]] = load i32, i32* [[TMP0]], align 4
160 ; IC-NEXT: [[TMP85:%.*]] = icmp eq i32 [[TMP83]], [[TMP84]]
161 ; IC-NEXT: br i1 [[TMP85]], label [[BB24_I_I:%.*]], label [[BB25_I_I:%.*]]
163 ; IC-NEXT: [[TMP86:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
164 ; IC-NEXT: [[TMP87:%.*]] = load i32*, i32** [[TMP86]], align 8
165 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
167 ; IC-NEXT: [[TMP88:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
168 ; IC-NEXT: [[TMP89:%.*]] = load i32*, i32** [[TMP88]], align 8
169 ; IC-NEXT: [[TMP90:%.*]] = getelementptr i32, i32* [[TMP89]], i32 1
170 ; IC-NEXT: [[TMP91:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__FIRST_ADDR_I_I]], i32 0, i32 0
171 ; IC-NEXT: store i32* [[TMP90]], i32** [[TMP91]], align 8
172 ; IC-NEXT: br label [[BB26_I_I]]
174 ; IC-NEXT: [[TMP92:%.*]] = getelementptr inbounds %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* [[__LAST_ADDR_I_I]], i32 0, i32 0
175 ; IC-NEXT: [[TMP93:%.*]] = load i32*, i32** [[TMP92]], align 8
176 ; IC-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
177 ; IC: _ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit:
178 ; IC-NEXT: [[DOT0_0_I_I:%.*]] = phi i32* [ [[TMP93]], [[BB26_I_I]] ], [ [[TMP87]], [[BB24_I_I]] ], [ [[TMP76]], [[BB20_I_I]] ], [ [[TMP65]], [[BB16_I_I]] ], [ [[TMP44]], [[BB10_I_I]] ], [ [[TMP35]], [[BB7_I_I]] ], [ [[TMP26]], [[BB4_I_I]] ], [ [[TMP17]], [[BB1_I_I]] ]
179 ; IC-NEXT: br label [[RETURN:%.*]]
181 ; IC-NEXT: ret i32* [[DOT0_0_I_I]]
183 ; IC_SROA-LABEL: @_Z3fooRSt6vectorIiSaIiEE(
184 ; IC_SROA-NEXT: entry:
185 ; IC_SROA-NEXT: [[TMP0:%.*]] = getelementptr %"struct.std::vector<int,std::allocator<int> >", %"struct.std::vector<int,std::allocator<int> >"* [[X:%.*]], i32 0, i32 0, i32 0, i32 1
186 ; IC_SROA-NEXT: [[TMP1:%.*]] = load i32*, i32** [[TMP0]], align 4
187 ; IC_SROA-NEXT: [[TMP2:%.*]] = getelementptr %"struct.std::vector<int,std::allocator<int> >", %"struct.std::vector<int,std::allocator<int> >"* [[X]], i32 0, i32 0, i32 0, i32 0
188 ; IC_SROA-NEXT: [[TMP3:%.*]] = load i32*, i32** [[TMP2]], align 4
189 ; IC_SROA-NEXT: [[TMP4:%.*]] = ptrtoint i32* [[TMP1]] to i32
190 ; IC_SROA-NEXT: [[TMP5:%.*]] = ptrtoint i32* [[TMP3]] to i32
191 ; IC_SROA-NEXT: [[TMP6:%.*]] = sub i32 [[TMP4]], [[TMP5]]
192 ; IC_SROA-NEXT: [[TMP7:%.*]] = ashr i32 [[TMP6]], 4
193 ; IC_SROA-NEXT: br label [[BB12_I_I:%.*]]
195 ; IC_SROA-NEXT: [[TMP8:%.*]] = load i32, i32* [[__FIRST_ADDR_I_I_SROA_0_0:%.*]], align 4
196 ; IC_SROA-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 42
197 ; IC_SROA-NEXT: br i1 [[TMP9]], label [[BB1_I_I:%.*]], label [[BB2_I_I:%.*]]
199 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT:%.*]]
201 ; IC_SROA-NEXT: [[TMP10:%.*]] = getelementptr i32, i32* [[__FIRST_ADDR_I_I_SROA_0_0]], i32 1
202 ; IC_SROA-NEXT: [[TMP11:%.*]] = load i32, i32* [[TMP10]], align 4
203 ; IC_SROA-NEXT: [[TMP12:%.*]] = icmp eq i32 [[TMP11]], 42
204 ; IC_SROA-NEXT: br i1 [[TMP12]], label [[BB4_I_I:%.*]], label [[BB5_I_I:%.*]]
206 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
208 ; IC_SROA-NEXT: [[TMP13:%.*]] = getelementptr i32, i32* [[TMP10]], i32 1
209 ; IC_SROA-NEXT: [[TMP14:%.*]] = load i32, i32* [[TMP13]], align 4
210 ; IC_SROA-NEXT: [[TMP15:%.*]] = icmp eq i32 [[TMP14]], 42
211 ; IC_SROA-NEXT: br i1 [[TMP15]], label [[BB7_I_I:%.*]], label [[BB8_I_I:%.*]]
213 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
215 ; IC_SROA-NEXT: [[TMP16:%.*]] = getelementptr i32, i32* [[TMP13]], i32 1
216 ; IC_SROA-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP16]], align 4
217 ; IC_SROA-NEXT: [[TMP18:%.*]] = icmp eq i32 [[TMP17]], 42
218 ; IC_SROA-NEXT: br i1 [[TMP18]], label [[BB10_I_I:%.*]], label [[BB11_I_I:%.*]]
220 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
222 ; IC_SROA-NEXT: [[TMP19:%.*]] = getelementptr i32, i32* [[TMP16]], i32 1
223 ; IC_SROA-NEXT: [[TMP20:%.*]] = add i32 [[__TRIP_COUNT_0_I_I:%.*]], -1
224 ; IC_SROA-NEXT: br label [[BB12_I_I]]
226 ; IC_SROA-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0]] = phi i32* [ [[TMP3]], [[ENTRY:%.*]] ], [ [[TMP19]], [[BB11_I_I]] ]
227 ; IC_SROA-NEXT: [[__TRIP_COUNT_0_I_I]] = phi i32 [ [[TMP7]], [[ENTRY]] ], [ [[TMP20]], [[BB11_I_I]] ]
228 ; IC_SROA-NEXT: [[TMP21:%.*]] = icmp sgt i32 [[__TRIP_COUNT_0_I_I]], 0
229 ; IC_SROA-NEXT: br i1 [[TMP21]], label [[BB_I_I:%.*]], label [[BB13_I_I:%.*]]
231 ; IC_SROA-NEXT: [[TMP22:%.*]] = ptrtoint i32* [[TMP1]] to i32
232 ; IC_SROA-NEXT: [[TMP23:%.*]] = ptrtoint i32* [[__FIRST_ADDR_I_I_SROA_0_0]] to i32
233 ; IC_SROA-NEXT: [[TMP24:%.*]] = sub i32 [[TMP22]], [[TMP23]]
234 ; IC_SROA-NEXT: [[TMP25:%.*]] = ashr i32 [[TMP24]], 2
235 ; IC_SROA-NEXT: switch i32 [[TMP25]], label [[BB26_I_I:%.*]] [
236 ; IC_SROA-NEXT: i32 1, label [[BB22_I_I:%.*]]
237 ; IC_SROA-NEXT: i32 2, label [[BB18_I_I:%.*]]
238 ; IC_SROA-NEXT: i32 3, label [[BB14_I_I:%.*]]
241 ; IC_SROA-NEXT: [[TMP26:%.*]] = load i32, i32* [[__FIRST_ADDR_I_I_SROA_0_0]], align 4
242 ; IC_SROA-NEXT: [[TMP27:%.*]] = icmp eq i32 [[TMP26]], 42
243 ; IC_SROA-NEXT: br i1 [[TMP27]], label [[BB16_I_I:%.*]], label [[BB17_I_I:%.*]]
245 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
247 ; IC_SROA-NEXT: [[TMP28:%.*]] = getelementptr i32, i32* [[__FIRST_ADDR_I_I_SROA_0_0]], i32 1
248 ; IC_SROA-NEXT: br label [[BB18_I_I]]
250 ; IC_SROA-NEXT: [[__FIRST_ADDR_I_I_SROA_0_1:%.*]] = phi i32* [ [[TMP28]], [[BB17_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0_0]], [[BB13_I_I]] ]
251 ; IC_SROA-NEXT: [[TMP29:%.*]] = load i32, i32* [[__FIRST_ADDR_I_I_SROA_0_1]], align 4
252 ; IC_SROA-NEXT: [[TMP30:%.*]] = icmp eq i32 [[TMP29]], 42
253 ; IC_SROA-NEXT: br i1 [[TMP30]], label [[BB20_I_I:%.*]], label [[BB21_I_I:%.*]]
255 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
257 ; IC_SROA-NEXT: [[TMP31:%.*]] = getelementptr i32, i32* [[__FIRST_ADDR_I_I_SROA_0_1]], i32 1
258 ; IC_SROA-NEXT: br label [[BB22_I_I]]
260 ; IC_SROA-NEXT: [[__FIRST_ADDR_I_I_SROA_0_2:%.*]] = phi i32* [ [[TMP31]], [[BB21_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0_0]], [[BB13_I_I]] ]
261 ; IC_SROA-NEXT: [[TMP32:%.*]] = load i32, i32* [[__FIRST_ADDR_I_I_SROA_0_2]], align 4
262 ; IC_SROA-NEXT: [[TMP33:%.*]] = icmp eq i32 [[TMP32]], 42
263 ; IC_SROA-NEXT: br i1 [[TMP33]], label [[BB24_I_I:%.*]], label [[BB25_I_I:%.*]]
265 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
267 ; IC_SROA-NEXT: [[TMP34:%.*]] = getelementptr i32, i32* [[__FIRST_ADDR_I_I_SROA_0_2]], i32 1
268 ; IC_SROA-NEXT: br label [[BB26_I_I]]
270 ; IC_SROA-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
271 ; IC_SROA: _ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit:
272 ; IC_SROA-NEXT: [[DOT0_0_I_I:%.*]] = phi i32* [ [[TMP1]], [[BB26_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0_2]], [[BB24_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0_1]], [[BB20_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0_0]], [[BB16_I_I]] ], [ [[TMP16]], [[BB10_I_I]] ], [ [[TMP13]], [[BB7_I_I]] ], [ [[TMP10]], [[BB4_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0_0]], [[BB1_I_I]] ]
273 ; IC_SROA-NEXT: br label [[RETURN:%.*]]
275 ; IC_SROA-NEXT: ret i32* [[DOT0_0_I_I]]
278 %0 = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
279 %__first_addr.i.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
280 %__last_addr.i.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
281 %unnamed_arg.i = alloca %"struct.std::bidirectional_iterator_tag", align 8
282 %1 = alloca %"struct.std::bidirectional_iterator_tag"
283 %__first_addr.i = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
284 %2 = alloca %"struct.std::bidirectional_iterator_tag"
285 %3 = alloca %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"
287 %"alloca point" = bitcast i32 0 to i32
288 store i32 42, i32* %4, align 4
289 %5 = getelementptr %"struct.std::vector<int,std::allocator<int> >", %"struct.std::vector<int,std::allocator<int> >"* %X, i32 0, i32 0
290 %6 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >", %"struct.std::_Vector_base<int,std::allocator<int> >"* %5, i32 0, i32 0
291 %7 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl", %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"* %6, i32 0, i32 1
292 %8 = load i32*, i32** %7, align 4
293 %9 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %3, i32 0, i32 0
294 store i32* %8, i32** %9, align 4
295 %10 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %3, i32 0, i32 0
296 %11 = load i32*, i32** %10, align 4
297 %tmp2.i = ptrtoint i32* %11 to i32
298 %tmp1.i = inttoptr i32 %tmp2.i to i32*
299 %tmp3 = ptrtoint i32* %tmp1.i to i32
300 %tmp2 = inttoptr i32 %tmp3 to i32*
301 %12 = getelementptr %"struct.std::vector<int,std::allocator<int> >", %"struct.std::vector<int,std::allocator<int> >"* %X, i32 0, i32 0
302 %13 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >", %"struct.std::_Vector_base<int,std::allocator<int> >"* %12, i32 0, i32 0
303 %14 = getelementptr %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl", %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl"* %13, i32 0, i32 0
304 %15 = load i32*, i32** %14, align 4
305 %16 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %0, i32 0, i32 0
306 store i32* %15, i32** %16, align 4
307 %17 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %0, i32 0, i32 0
308 %18 = load i32*, i32** %17, align 4
309 %tmp2.i17 = ptrtoint i32* %18 to i32
310 %tmp1.i18 = inttoptr i32 %tmp2.i17 to i32*
311 %tmp8 = ptrtoint i32* %tmp1.i18 to i32
312 %tmp6 = inttoptr i32 %tmp8 to i32*
313 %19 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i, i32 0, i32 0
314 store i32* %tmp6, i32** %19
315 %20 = getelementptr %"struct.std::bidirectional_iterator_tag", %"struct.std::bidirectional_iterator_tag"* %1, i32 0, i32 0
316 %21 = load i8, i8* %20, align 1
320 %25 = getelementptr %"struct.std::bidirectional_iterator_tag", %"struct.std::bidirectional_iterator_tag"* %2, i32 0, i32 0
321 store i8 0, i8* %25, align 1
322 %elt.i = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i, i32 0, i32 0
323 %val.i = load i32*, i32** %elt.i
324 %tmp.i = bitcast %"struct.std::bidirectional_iterator_tag"* %unnamed_arg.i to i8*
325 %tmp9.i = bitcast %"struct.std::bidirectional_iterator_tag"* %2 to i8*
326 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp.i, i8* %tmp9.i, i64 1, i1 false)
327 %26 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
328 store i32* %val.i, i32** %26
329 %27 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
330 store i32* %tmp2, i32** %27
331 %28 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
332 %29 = load i32*, i32** %28, align 4
333 %30 = ptrtoint i32* %29 to i32
334 %31 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
335 %32 = load i32*, i32** %31, align 4
336 %33 = ptrtoint i32* %32 to i32
337 %34 = sub i32 %30, %33
338 %35 = ashr i32 %34, 2
339 %36 = ashr i32 %35, 2
342 bb.i.i: ; preds = %bb12.i.i
343 %37 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
344 %38 = load i32*, i32** %37, align 4
345 %39 = load i32, i32* %38, align 4
346 %40 = load i32, i32* %4, align 4
347 %41 = icmp eq i32 %39, %40
348 %42 = zext i1 %41 to i8
349 %toBool.i.i = icmp ne i8 %42, 0
350 br i1 %toBool.i.i, label %bb1.i.i, label %bb2.i.i
352 bb1.i.i: ; preds = %bb.i.i
353 %43 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
354 %44 = load i32*, i32** %43, align 4
355 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
357 bb2.i.i: ; preds = %bb.i.i
358 %45 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
359 %46 = load i32*, i32** %45, align 4
360 %47 = getelementptr i32, i32* %46, i64 1
361 %48 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
362 store i32* %47, i32** %48, align 4
363 %49 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
364 %50 = load i32*, i32** %49, align 4
365 %51 = load i32, i32* %50, align 4
366 %52 = load i32, i32* %4, align 4
367 %53 = icmp eq i32 %51, %52
368 %54 = zext i1 %53 to i8
369 %toBool3.i.i = icmp ne i8 %54, 0
370 br i1 %toBool3.i.i, label %bb4.i.i, label %bb5.i.i
372 bb4.i.i: ; preds = %bb2.i.i
373 %55 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
374 %56 = load i32*, i32** %55, align 4
375 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
377 bb5.i.i: ; preds = %bb2.i.i
378 %57 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
379 %58 = load i32*, i32** %57, align 4
380 %59 = getelementptr i32, i32* %58, i64 1
381 %60 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
382 store i32* %59, i32** %60, align 4
383 %61 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
384 %62 = load i32*, i32** %61, align 4
385 %63 = load i32, i32* %62, align 4
386 %64 = load i32, i32* %4, align 4
387 %65 = icmp eq i32 %63, %64
388 %66 = zext i1 %65 to i8
389 %toBool6.i.i = icmp ne i8 %66, 0
390 br i1 %toBool6.i.i, label %bb7.i.i, label %bb8.i.i
392 bb7.i.i: ; preds = %bb5.i.i
393 %67 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
394 %68 = load i32*, i32** %67, align 4
395 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
397 bb8.i.i: ; preds = %bb5.i.i
398 %69 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
399 %70 = load i32*, i32** %69, align 4
400 %71 = getelementptr i32, i32* %70, i64 1
401 %72 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
402 store i32* %71, i32** %72, align 4
403 %73 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
404 %74 = load i32*, i32** %73, align 4
405 %75 = load i32, i32* %74, align 4
406 %76 = load i32, i32* %4, align 4
407 %77 = icmp eq i32 %75, %76
408 %78 = zext i1 %77 to i8
409 %toBool9.i.i = icmp ne i8 %78, 0
410 br i1 %toBool9.i.i, label %bb10.i.i, label %bb11.i.i
412 bb10.i.i: ; preds = %bb8.i.i
413 %79 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
414 %80 = load i32*, i32** %79, align 4
415 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
417 bb11.i.i: ; preds = %bb8.i.i
418 %81 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
419 %82 = load i32*, i32** %81, align 4
420 %83 = getelementptr i32, i32* %82, i64 1
421 %84 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
422 store i32* %83, i32** %84, align 4
423 %85 = sub i32 %__trip_count.0.i.i, 1
426 bb12.i.i: ; preds = %bb11.i.i, %entry
427 %__trip_count.0.i.i = phi i32 [ %36, %entry ], [ %85, %bb11.i.i ]
428 %86 = icmp sgt i32 %__trip_count.0.i.i, 0
429 br i1 %86, label %bb.i.i, label %bb13.i.i
431 bb13.i.i: ; preds = %bb12.i.i
432 %87 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
433 %88 = load i32*, i32** %87, align 4
434 %89 = ptrtoint i32* %88 to i32
435 %90 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
436 %91 = load i32*, i32** %90, align 4
437 %92 = ptrtoint i32* %91 to i32
438 %93 = sub i32 %89, %92
439 %94 = ashr i32 %93, 2
440 switch i32 %94, label %bb26.i.i [
441 i32 1, label %bb22.i.i
442 i32 2, label %bb18.i.i
443 i32 3, label %bb14.i.i
446 bb14.i.i: ; preds = %bb13.i.i
447 %95 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
448 %96 = load i32*, i32** %95, align 4
449 %97 = load i32, i32* %96, align 4
450 %98 = load i32, i32* %4, align 4
451 %99 = icmp eq i32 %97, %98
452 %100 = zext i1 %99 to i8
453 %toBool15.i.i = icmp ne i8 %100, 0
454 br i1 %toBool15.i.i, label %bb16.i.i, label %bb17.i.i
456 bb16.i.i: ; preds = %bb14.i.i
457 %101 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
458 %102 = load i32*, i32** %101, align 4
459 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
461 bb17.i.i: ; preds = %bb14.i.i
462 %103 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
463 %104 = load i32*, i32** %103, align 4
464 %105 = getelementptr i32, i32* %104, i64 1
465 %106 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
466 store i32* %105, i32** %106, align 4
469 bb18.i.i: ; preds = %bb17.i.i, %bb13.i.i
470 %107 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
471 %108 = load i32*, i32** %107, align 4
472 %109 = load i32, i32* %108, align 4
473 %110 = load i32, i32* %4, align 4
474 %111 = icmp eq i32 %109, %110
475 %112 = zext i1 %111 to i8
476 %toBool19.i.i = icmp ne i8 %112, 0
477 br i1 %toBool19.i.i, label %bb20.i.i, label %bb21.i.i
479 bb20.i.i: ; preds = %bb18.i.i
480 %113 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
481 %114 = load i32*, i32** %113, align 4
482 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
484 bb21.i.i: ; preds = %bb18.i.i
485 %115 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
486 %116 = load i32*, i32** %115, align 4
487 %117 = getelementptr i32, i32* %116, i64 1
488 %118 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
489 store i32* %117, i32** %118, align 4
492 bb22.i.i: ; preds = %bb21.i.i, %bb13.i.i
493 %119 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
494 %120 = load i32*, i32** %119, align 4
495 %121 = load i32, i32* %120, align 4
496 %122 = load i32, i32* %4, align 4
497 %123 = icmp eq i32 %121, %122
498 %124 = zext i1 %123 to i8
499 %toBool23.i.i = icmp ne i8 %124, 0
500 br i1 %toBool23.i.i, label %bb24.i.i, label %bb25.i.i
502 bb24.i.i: ; preds = %bb22.i.i
503 %125 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
504 %126 = load i32*, i32** %125, align 4
505 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
507 bb25.i.i: ; preds = %bb22.i.i
508 %127 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
509 %128 = load i32*, i32** %127, align 4
510 %129 = getelementptr i32, i32* %128, i64 1
511 %130 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__first_addr.i.i, i32 0, i32 0
512 store i32* %129, i32** %130, align 4
515 bb26.i.i: ; preds = %bb25.i.i, %bb13.i.i
516 %131 = getelementptr %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >", %"struct.__gnu_cxx::__normal_iterator<int*,std::vector<int, std::allocator<int> > >"* %__last_addr.i.i, i32 0, i32 0
517 %132 = load i32*, i32** %131, align 4
518 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
520 _ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit: ; preds = %bb26.i.i, %bb24.i.i, %bb20.i.i, %bb16.i.i, %bb10.i.i, %bb7.i.i, %bb4.i.i, %bb1.i.i
521 %.0.0.i.i = phi i32* [ %132, %bb26.i.i ], [ %126, %bb24.i.i ], [ %114, %bb20.i.i ], [ %102, %bb16.i.i ], [ %80, %bb10.i.i ], [ %68, %bb7.i.i ], [ %56, %bb4.i.i ], [ %44, %bb1.i.i ]
522 %tmp2.i.i = ptrtoint i32* %.0.0.i.i to i32
523 %tmp1.i.i = inttoptr i32 %tmp2.i.i to i32*
524 %tmp4.i = ptrtoint i32* %tmp1.i.i to i32
525 %tmp3.i = inttoptr i32 %tmp4.i to i32*
526 %tmp8.i = ptrtoint i32* %tmp3.i to i32
527 %tmp6.i = inttoptr i32 %tmp8.i to i32*
528 %tmp12 = ptrtoint i32* %tmp6.i to i32
529 %tmp10 = inttoptr i32 %tmp12 to i32*
530 %tmp16 = ptrtoint i32* %tmp10 to i32
533 return: ; preds = %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
534 %tmp14 = inttoptr i32 %tmp16 to i32*
538 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind