1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes='sroa<preserve-cfg>' -S | FileCheck %s --check-prefixes=CHECK,CHECK-PRESERVE-CFG
3 ; RUN: opt < %s -passes='sroa<modify-cfg>' -S | FileCheck %s --check-prefixes=CHECK,CHECK-MODIFY-CFG
7 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"
8 target triple = "i386-apple-darwin9.6"
10 %"struct.std::vector<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >" }
11 %"struct.std::_Vector_base<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" }
12 %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" = type { ptr, ptr, ptr }
14 define ptr @_Z3fooRSt6vectorIiSaIiEE(ptr %X) {
15 ; CHECK-LABEL: @_Z3fooRSt6vectorIiSaIiEE(
17 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0:%.*]] = alloca ptr, align 8
18 ; CHECK-NEXT: [[__LAST_ADDR_I_I_SROA_0:%.*]] = alloca ptr, align 8
19 ; CHECK-NEXT: [[TMP0:%.*]] = getelementptr %"struct.std::vector<int,std::allocator<int> >", ptr [[X:%.*]], i32 0, i32 0, i32 0, i32 1
20 ; CHECK-NEXT: [[TMP1:%.*]] = load ptr, ptr [[TMP0]], align 4
21 ; CHECK-NEXT: [[TMP2:%.*]] = getelementptr %"struct.std::vector<int,std::allocator<int> >", ptr [[X]], i32 0, i32 0, i32 0, i32 0
22 ; CHECK-NEXT: [[TMP3:%.*]] = load ptr, ptr [[TMP2]], align 4
23 ; CHECK-NEXT: store ptr [[TMP3]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
24 ; CHECK-NEXT: store ptr [[TMP1]], ptr [[__LAST_ADDR_I_I_SROA_0]], align 8
25 ; CHECK-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[TMP1]] to i32
26 ; CHECK-NEXT: [[TMP5:%.*]] = ptrtoint ptr [[TMP3]] to i32
27 ; CHECK-NEXT: [[TMP6:%.*]] = sub i32 [[TMP4]], [[TMP5]]
28 ; CHECK-NEXT: [[TMP7:%.*]] = ashr i32 [[TMP6]], 4
29 ; CHECK-NEXT: br label [[BB12_I_I:%.*]]
31 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_13:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
32 ; CHECK-NEXT: [[TMP8:%.*]] = load i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_13]], align 4
33 ; CHECK-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 42
34 ; CHECK-NEXT: br i1 [[TMP9]], label [[BB1_I_I:%.*]], label [[BB2_I_I:%.*]]
36 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT:%.*]]
38 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_14:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
39 ; CHECK-NEXT: [[TMP10:%.*]] = getelementptr i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_14]], i32 1
40 ; CHECK-NEXT: store ptr [[TMP10]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
41 ; CHECK-NEXT: [[TMP11:%.*]] = load i32, ptr [[TMP10]], align 4
42 ; CHECK-NEXT: [[TMP12:%.*]] = icmp eq i32 [[TMP11]], 42
43 ; CHECK-NEXT: br i1 [[TMP12]], label [[BB4_I_I:%.*]], label [[BB5_I_I:%.*]]
45 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
47 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_15:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
48 ; CHECK-NEXT: [[TMP13:%.*]] = getelementptr i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_15]], i32 1
49 ; CHECK-NEXT: store ptr [[TMP13]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
50 ; CHECK-NEXT: [[TMP14:%.*]] = load i32, ptr [[TMP13]], align 4
51 ; CHECK-NEXT: [[TMP15:%.*]] = icmp eq i32 [[TMP14]], 42
52 ; CHECK-NEXT: br i1 [[TMP15]], label [[BB7_I_I:%.*]], label [[BB8_I_I:%.*]]
54 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
56 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_16:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
57 ; CHECK-NEXT: [[TMP16:%.*]] = getelementptr i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_16]], i32 1
58 ; CHECK-NEXT: store ptr [[TMP16]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
59 ; CHECK-NEXT: [[TMP17:%.*]] = load i32, ptr [[TMP16]], align 4
60 ; CHECK-NEXT: [[TMP18:%.*]] = icmp eq i32 [[TMP17]], 42
61 ; CHECK-NEXT: br i1 [[TMP18]], label [[BB10_I_I:%.*]], label [[BB11_I_I:%.*]]
63 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
65 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_17:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
66 ; CHECK-NEXT: [[TMP19:%.*]] = getelementptr i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_17]], i32 1
67 ; CHECK-NEXT: store ptr [[TMP19]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
68 ; CHECK-NEXT: [[TMP20:%.*]] = add i32 [[__TRIP_COUNT_0_I_I:%.*]], -1
69 ; CHECK-NEXT: br label [[BB12_I_I]]
71 ; CHECK-NEXT: [[__TRIP_COUNT_0_I_I]] = phi i32 [ [[TMP7]], [[ENTRY:%.*]] ], [ [[TMP20]], [[BB11_I_I]] ]
72 ; CHECK-NEXT: [[TMP21:%.*]] = icmp sgt i32 [[__TRIP_COUNT_0_I_I]], 0
73 ; CHECK-NEXT: br i1 [[TMP21]], label [[BB_I_I:%.*]], label [[BB13_I_I:%.*]]
75 ; CHECK-NEXT: [[__LAST_ADDR_I_I_SROA_0_0___LAST_ADDR_I_I_SROA_0_0___LAST_ADDR_I_I_SROA_0_0___LAST_ADDR_I_I_SROA_0_0_:%.*]] = load ptr, ptr [[__LAST_ADDR_I_I_SROA_0]], align 8
76 ; CHECK-NEXT: [[TMP22:%.*]] = ptrtoint ptr [[__LAST_ADDR_I_I_SROA_0_0___LAST_ADDR_I_I_SROA_0_0___LAST_ADDR_I_I_SROA_0_0___LAST_ADDR_I_I_SROA_0_0_]] to i32
77 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
78 ; CHECK-NEXT: [[TMP23:%.*]] = ptrtoint ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_]] to i32
79 ; CHECK-NEXT: [[TMP24:%.*]] = sub i32 [[TMP22]], [[TMP23]]
80 ; CHECK-NEXT: [[TMP25:%.*]] = ashr i32 [[TMP24]], 2
81 ; CHECK-NEXT: switch i32 [[TMP25]], label [[BB26_I_I:%.*]] [
82 ; CHECK-NEXT: i32 1, label [[BB22_I_I:%.*]]
83 ; CHECK-NEXT: i32 2, label [[BB18_I_I:%.*]]
84 ; CHECK-NEXT: i32 3, label [[BB14_I_I:%.*]]
87 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_7:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
88 ; CHECK-NEXT: [[TMP26:%.*]] = load i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_7]], align 4
89 ; CHECK-NEXT: [[TMP27:%.*]] = icmp eq i32 [[TMP26]], 42
90 ; CHECK-NEXT: br i1 [[TMP27]], label [[BB16_I_I:%.*]], label [[BB17_I_I:%.*]]
92 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
94 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_8:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
95 ; CHECK-NEXT: [[TMP28:%.*]] = getelementptr i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_8]], i32 1
96 ; CHECK-NEXT: store ptr [[TMP28]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
97 ; CHECK-NEXT: br label [[BB18_I_I]]
99 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_9:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
100 ; CHECK-NEXT: [[TMP29:%.*]] = load i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_9]], align 4
101 ; CHECK-NEXT: [[TMP30:%.*]] = icmp eq i32 [[TMP29]], 42
102 ; CHECK-NEXT: br i1 [[TMP30]], label [[BB20_I_I:%.*]], label [[BB21_I_I:%.*]]
104 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
106 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_10:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
107 ; CHECK-NEXT: [[TMP31:%.*]] = getelementptr i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_10]], i32 1
108 ; CHECK-NEXT: store ptr [[TMP31]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
109 ; CHECK-NEXT: br label [[BB22_I_I]]
111 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_11:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
112 ; CHECK-NEXT: [[TMP32:%.*]] = load i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_11]], align 4
113 ; CHECK-NEXT: [[TMP33:%.*]] = icmp eq i32 [[TMP32]], 42
114 ; CHECK-NEXT: br i1 [[TMP33]], label [[BB24_I_I:%.*]], label [[BB25_I_I:%.*]]
116 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
118 ; CHECK-NEXT: [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_12:%.*]] = load ptr, ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
119 ; CHECK-NEXT: [[TMP34:%.*]] = getelementptr i32, ptr [[__FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0___FIRST_ADDR_I_I_SROA_0_0_12]], i32 1
120 ; CHECK-NEXT: store ptr [[TMP34]], ptr [[__FIRST_ADDR_I_I_SROA_0]], align 8
121 ; CHECK-NEXT: br label [[BB26_I_I]]
123 ; CHECK-NEXT: br label [[_ZST4FINDIN9__GNU_CXX17__NORMAL_ITERATORIPIST6VECTORIISAIIEEEEIET_S7_S7_RKT0__EXIT]]
124 ; CHECK: _ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit:
125 ; CHECK-NEXT: [[DOTIN_IN:%.*]] = phi ptr [ [[__LAST_ADDR_I_I_SROA_0]], [[BB26_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0]], [[BB24_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0]], [[BB20_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0]], [[BB16_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0]], [[BB10_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0]], [[BB7_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0]], [[BB4_I_I]] ], [ [[__FIRST_ADDR_I_I_SROA_0]], [[BB1_I_I]] ]
126 ; CHECK-NEXT: br label [[RETURN:%.*]]
128 ; CHECK-NEXT: [[TMP35:%.*]] = load ptr, ptr [[DOTIN_IN]], align 4
129 ; CHECK-NEXT: ret ptr [[TMP35]]
132 %__first_addr.i.i.sroa.0 = alloca ptr, align 8
133 %__last_addr.i.i.sroa.0 = alloca ptr, align 8
134 %0 = getelementptr %"struct.std::vector<int,std::allocator<int> >", ptr %X, i32 0, i32 0, i32 0, i32 1
135 %1 = load ptr, ptr %0, align 4
136 %2 = getelementptr %"struct.std::vector<int,std::allocator<int> >", ptr %X, i32 0, i32 0, i32 0, i32 0
137 %3 = load ptr, ptr %2, align 4
138 store ptr %3, ptr %__first_addr.i.i.sroa.0, align 8
139 store ptr %1, ptr %__last_addr.i.i.sroa.0, align 8
140 %4 = ptrtoint ptr %1 to i32
141 %5 = ptrtoint ptr %3 to i32
146 bb.i.i: ; preds = %bb12.i.i
147 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.13 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
148 %8 = load i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.13, align 4
149 %9 = icmp eq i32 %8, 42
150 br i1 %9, label %bb1.i.i, label %bb2.i.i
152 bb1.i.i: ; preds = %bb.i.i
153 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
155 bb2.i.i: ; preds = %bb.i.i
156 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.14 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
157 %10 = getelementptr i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.14, i32 1
158 store ptr %10, ptr %__first_addr.i.i.sroa.0, align 8
159 %11 = load i32, ptr %10, align 4
160 %12 = icmp eq i32 %11, 42
161 br i1 %12, label %bb4.i.i, label %bb5.i.i
163 bb4.i.i: ; preds = %bb2.i.i
164 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
166 bb5.i.i: ; preds = %bb2.i.i
167 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.15 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
168 %13 = getelementptr i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.15, i32 1
169 store ptr %13, ptr %__first_addr.i.i.sroa.0, align 8
170 %14 = load i32, ptr %13, align 4
171 %15 = icmp eq i32 %14, 42
172 br i1 %15, label %bb7.i.i, label %bb8.i.i
174 bb7.i.i: ; preds = %bb5.i.i
175 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
177 bb8.i.i: ; preds = %bb5.i.i
178 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.16 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
179 %16 = getelementptr i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.16, i32 1
180 store ptr %16, ptr %__first_addr.i.i.sroa.0, align 8
181 %17 = load i32, ptr %16, align 4
182 %18 = icmp eq i32 %17, 42
183 br i1 %18, label %bb10.i.i, label %bb11.i.i
185 bb10.i.i: ; preds = %bb8.i.i
186 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
188 bb11.i.i: ; preds = %bb8.i.i
189 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.17 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
190 %19 = getelementptr i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.17, i32 1
191 store ptr %19, ptr %__first_addr.i.i.sroa.0, align 8
192 %20 = add i32 %__trip_count.0.i.i, -1
195 bb12.i.i: ; preds = %bb11.i.i, %entry
196 %__trip_count.0.i.i = phi i32 [ %7, %entry ], [ %20, %bb11.i.i ]
197 %21 = icmp sgt i32 %__trip_count.0.i.i, 0
198 br i1 %21, label %bb.i.i, label %bb13.i.i
200 bb13.i.i: ; preds = %bb12.i.i
201 %__last_addr.i.i.sroa.0.0.__last_addr.i.i.sroa.0.0.__last_addr.i.i.sroa.0.0. = load ptr, ptr %__last_addr.i.i.sroa.0, align 8
202 %22 = ptrtoint ptr %__last_addr.i.i.sroa.0.0.__last_addr.i.i.sroa.0.0.__last_addr.i.i.sroa.0.0. to i32
203 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0. = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
204 %23 = ptrtoint ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0. to i32
205 %24 = sub i32 %22, %23
206 %25 = ashr i32 %24, 2
207 switch i32 %25, label %bb26.i.i [
208 i32 1, label %bb22.i.i
209 i32 2, label %bb18.i.i
210 i32 3, label %bb14.i.i
213 bb14.i.i: ; preds = %bb13.i.i
214 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.7 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
215 %26 = load i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.7, align 4
216 %27 = icmp eq i32 %26, 42
217 br i1 %27, label %bb16.i.i, label %bb17.i.i
219 bb16.i.i: ; preds = %bb14.i.i
220 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
222 bb17.i.i: ; preds = %bb14.i.i
223 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.8 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
224 %28 = getelementptr i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.8, i32 1
225 store ptr %28, ptr %__first_addr.i.i.sroa.0, align 8
228 bb18.i.i: ; preds = %bb17.i.i, %bb13.i.i
229 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.9 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
230 %29 = load i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.9, align 4
231 %30 = icmp eq i32 %29, 42
232 br i1 %30, label %bb20.i.i, label %bb21.i.i
234 bb20.i.i: ; preds = %bb18.i.i
235 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
237 bb21.i.i: ; preds = %bb18.i.i
238 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.10 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
239 %31 = getelementptr i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.10, i32 1
240 store ptr %31, ptr %__first_addr.i.i.sroa.0, align 8
243 bb22.i.i: ; preds = %bb21.i.i, %bb13.i.i
244 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.11 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
245 %32 = load i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.11, align 4
246 %33 = icmp eq i32 %32, 42
247 br i1 %33, label %bb24.i.i, label %bb25.i.i
249 bb24.i.i: ; preds = %bb22.i.i
250 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
252 bb25.i.i: ; preds = %bb22.i.i
253 %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.12 = load ptr, ptr %__first_addr.i.i.sroa.0, align 8
254 %34 = getelementptr i32, ptr %__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.__first_addr.i.i.sroa.0.0.12, i32 1
255 store ptr %34, ptr %__first_addr.i.i.sroa.0, align 8
258 bb26.i.i: ; preds = %bb25.i.i, %bb13.i.i
259 br label %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
261 _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
262 %.in.in = phi ptr [ %__last_addr.i.i.sroa.0, %bb26.i.i ], [ %__first_addr.i.i.sroa.0, %bb24.i.i ], [ %__first_addr.i.i.sroa.0, %bb20.i.i ], [ %__first_addr.i.i.sroa.0, %bb16.i.i ], [ %__first_addr.i.i.sroa.0, %bb10.i.i ], [ %__first_addr.i.i.sroa.0, %bb7.i.i ], [ %__first_addr.i.i.sroa.0, %bb4.i.i ], [ %__first_addr.i.i.sroa.0, %bb1.i.i ]
265 return: ; preds = %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_.exit
266 %35 = load ptr, ptr %.in.in, align 4
270 ; Function Attrs: argmemonly nofree nosync nounwind willreturn
271 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0
273 attributes #0 = { argmemonly nofree nosync nounwind willreturn }
274 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
275 ; CHECK-MODIFY-CFG: {{.*}}
276 ; CHECK-PRESERVE-CFG: {{.*}}