259 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s3 4define i32 @test(i8 %0, i32 %conv2, i1 %cmp.i, i64 %shl.i) {5; CHECK-LABEL: define i32 @test(6; CHECK-SAME: i8 [[TMP0:%.*]], i32 [[CONV2:%.*]], i1 [[CMP_I:%.*]], i64 [[SHL_I:%.*]]) {7; CHECK-NEXT: [[ENTRY:.*:]]8; CHECK-NEXT: [[CONV21:%.*]] = sext i8 [[TMP0]] to i329; CHECK-NEXT: [[CONV7:%.*]] = zext i32 [[CONV2]] to i6410; CHECK-NEXT: [[COND_I:%.*]] = shl i64 [[CONV7]], [[SHL_I]]11; CHECK-NEXT: [[TMP1:%.*]] = and i64 [[COND_I]], 429496729512; CHECK-NEXT: [[DOTNOT:%.*]] = icmp eq i64 [[TMP1]], 113; CHECK-NEXT: [[CONV7_1:%.*]] = zext i32 [[CONV2]] to i6414; CHECK-NEXT: [[COND_I_1:%.*]] = shl i64 [[CONV7_1]], [[SHL_I]]15; CHECK-NEXT: [[TMP2:%.*]] = and i64 [[COND_I_1]], 429496729516; CHECK-NEXT: [[DOTNOT_1:%.*]] = icmp eq i64 [[TMP2]], 117; CHECK-NEXT: [[SUB_2:%.*]] = or i32 [[CONV21]], 118; CHECK-NEXT: [[COND_2:%.*]] = select i1 [[CMP_I]], i32 [[SUB_2]], i32 019; CHECK-NEXT: [[CONV7_2:%.*]] = zext i32 [[COND_2]] to i6420; CHECK-NEXT: [[CMP_I_2:%.*]] = icmp slt i32 [[COND_2]], 121; CHECK-NEXT: [[SHL_I_2:%.*]] = zext i1 [[CMP_I_2]] to i6422; CHECK-NEXT: [[COND_I_2:%.*]] = shl i64 [[CONV7_2]], [[SHL_I_2]]23; CHECK-NEXT: [[TMP3:%.*]] = and i64 [[COND_I_2]], 429496729524; CHECK-NEXT: [[DOTNOT_2:%.*]] = icmp eq i64 [[TMP3]], 125; CHECK-NEXT: [[SUB_3:%.*]] = or i32 [[CONV21]], 126; CHECK-NEXT: [[COND_3:%.*]] = select i1 [[CMP_I]], i32 [[SUB_3]], i32 027; CHECK-NEXT: [[CONV7_3:%.*]] = zext i32 [[COND_3]] to i6428; CHECK-NEXT: [[CMP_I_3:%.*]] = icmp slt i32 [[COND_3]], 129; CHECK-NEXT: [[SHL_I_3:%.*]] = zext i1 [[CMP_I_3]] to i6430; CHECK-NEXT: [[COND_I_3:%.*]] = shl i64 [[CONV7_3]], [[SHL_I_3]]31; CHECK-NEXT: [[TMP4:%.*]] = and i64 [[COND_I_3]], 429496729532; CHECK-NEXT: [[DOTNOT_3:%.*]] = icmp eq i64 [[TMP4]], 133; CHECK-NEXT: [[SUB_4:%.*]] = or i32 [[CONV21]], 134; CHECK-NEXT: [[COND_4:%.*]] = select i1 [[CMP_I]], i32 [[SUB_4]], i32 035; CHECK-NEXT: [[CONV7_4:%.*]] = zext i32 [[COND_4]] to i6436; CHECK-NEXT: [[CMP_I_4:%.*]] = icmp slt i32 [[COND_4]], 137; CHECK-NEXT: [[SHL_I_4:%.*]] = zext i1 [[CMP_I_4]] to i6438; CHECK-NEXT: [[COND_I_4:%.*]] = shl i64 [[CONV7_4]], [[SHL_I_4]]39; CHECK-NEXT: [[TMP5:%.*]] = and i64 [[COND_I_4]], 429496729540; CHECK-NEXT: [[DOTNOT_4:%.*]] = icmp eq i64 [[TMP5]], 141; CHECK-NEXT: [[SUB_5:%.*]] = or i32 [[CONV21]], 142; CHECK-NEXT: [[COND_5:%.*]] = select i1 [[CMP_I]], i32 [[SUB_5]], i32 043; CHECK-NEXT: [[CONV7_5:%.*]] = zext i32 [[COND_5]] to i6444; CHECK-NEXT: [[CMP_I_5:%.*]] = icmp slt i32 [[COND_5]], 145; CHECK-NEXT: [[SHL_I_5:%.*]] = zext i1 [[CMP_I_5]] to i6446; CHECK-NEXT: [[COND_I_5:%.*]] = shl i64 [[CONV7_5]], [[SHL_I_5]]47; CHECK-NEXT: [[TMP6:%.*]] = and i64 [[COND_I_5]], 429496729548; CHECK-NEXT: [[DOTNOT_5:%.*]] = icmp eq i64 [[TMP6]], 149; CHECK-NEXT: [[SUB_6:%.*]] = or i32 [[CONV21]], 150; CHECK-NEXT: [[COND_6:%.*]] = select i1 [[CMP_I]], i32 [[SUB_6]], i32 051; CHECK-NEXT: [[CONV7_6:%.*]] = zext i32 [[COND_6]] to i6452; CHECK-NEXT: [[CMP_I_6:%.*]] = icmp slt i32 [[COND_6]], 153; CHECK-NEXT: [[SHL_I_6:%.*]] = zext i1 [[CMP_I_6]] to i6454; CHECK-NEXT: [[COND_I_6:%.*]] = shl i64 [[CONV7_6]], [[SHL_I_6]]55; CHECK-NEXT: [[TMP7:%.*]] = and i64 [[COND_I_6]], 429496729556; CHECK-NEXT: [[DOTNOT_6:%.*]] = icmp eq i64 [[TMP7]], 157; CHECK-NEXT: [[SUB_7:%.*]] = or i32 [[CONV21]], 158; CHECK-NEXT: [[COND_7:%.*]] = select i1 [[CMP_I]], i32 [[SUB_7]], i32 059; CHECK-NEXT: [[CONV7_7:%.*]] = zext i32 [[COND_7]] to i6460; CHECK-NEXT: [[CMP_I_7:%.*]] = icmp slt i32 [[COND_7]], 161; CHECK-NEXT: [[SHL_I_7:%.*]] = zext i1 [[CMP_I_7]] to i6462; CHECK-NEXT: [[COND_I_7:%.*]] = shl i64 [[CONV7_7]], [[SHL_I_7]]63; CHECK-NEXT: [[TMP8:%.*]] = and i64 [[COND_I_7]], 429496729564; CHECK-NEXT: [[DOTNOT_7:%.*]] = icmp eq i64 [[TMP8]], 165; CHECK-NEXT: [[SUB_8:%.*]] = or i32 [[CONV21]], 166; CHECK-NEXT: [[COND_8:%.*]] = select i1 [[CMP_I]], i32 [[SUB_8]], i32 067; CHECK-NEXT: [[CONV7_8:%.*]] = zext i32 [[COND_8]] to i6468; CHECK-NEXT: [[CMP_I_8:%.*]] = icmp slt i32 [[COND_8]], 169; CHECK-NEXT: [[SHL_I_8:%.*]] = zext i1 [[CMP_I_8]] to i6470; CHECK-NEXT: [[COND_I_8:%.*]] = shl i64 [[CONV7_8]], [[SHL_I_8]]71; CHECK-NEXT: [[TMP9:%.*]] = and i64 [[COND_I_8]], 429496729572; CHECK-NEXT: [[DOTNOT_8:%.*]] = icmp eq i64 [[TMP9]], 173; CHECK-NEXT: [[SUB_9:%.*]] = or i32 [[CONV21]], 174; CHECK-NEXT: [[COND_9:%.*]] = select i1 [[CMP_I]], i32 [[SUB_9]], i32 075; CHECK-NEXT: [[CONV7_9:%.*]] = zext i32 [[COND_9]] to i6476; CHECK-NEXT: [[CMP_I_9:%.*]] = icmp slt i32 [[COND_9]], 177; CHECK-NEXT: [[SHL_I_9:%.*]] = zext i1 [[CMP_I_9]] to i6478; CHECK-NEXT: [[COND_I_9:%.*]] = shl i64 [[CONV7_9]], [[SHL_I_9]]79; CHECK-NEXT: [[TMP10:%.*]] = and i64 [[COND_I_9]], 429496729580; CHECK-NEXT: [[DOTNOT_9:%.*]] = icmp eq i64 [[TMP10]], 181; CHECK-NEXT: br label %[[WHILE_BODY:.*]]82; CHECK: [[WHILE_BODY]]:83; CHECK-NEXT: br i1 [[DOTNOT]], label %[[FOR_INC:.*]], label %[[IF_THEN10:.*]]84; CHECK: [[IF_THEN10]]:85; CHECK-NEXT: br label %[[FOR_INC]]86; CHECK: [[FOR_INC]]:87; CHECK-NEXT: br i1 [[DOTNOT_1]], label %[[FOR_INC_1:.*]], label %[[IF_THEN10_1:.*]]88; CHECK: [[IF_THEN10_1]]:89; CHECK-NEXT: br label %[[FOR_INC_1]]90; CHECK: [[FOR_INC_1]]:91; CHECK-NEXT: br i1 [[DOTNOT_2]], label %[[FOR_INC_2:.*]], label %[[IF_THEN10_2:.*]]92; CHECK: [[IF_THEN10_2]]:93; CHECK-NEXT: br label %[[FOR_INC_2]]94; CHECK: [[FOR_INC_2]]:95; CHECK-NEXT: br i1 [[DOTNOT_3]], label %[[FOR_INC_3:.*]], label %[[IF_THEN10_3:.*]]96; CHECK: [[IF_THEN10_3]]:97; CHECK-NEXT: br label %[[FOR_INC_3]]98; CHECK: [[FOR_INC_3]]:99; CHECK-NEXT: br i1 [[DOTNOT_4]], label %[[FOR_INC_4:.*]], label %[[IF_THEN10_4:.*]]100; CHECK: [[IF_THEN10_4]]:101; CHECK-NEXT: br label %[[FOR_INC_4]]102; CHECK: [[FOR_INC_4]]:103; CHECK-NEXT: br i1 [[DOTNOT_5]], label %[[FOR_INC_5:.*]], label %[[IF_THEN10_5:.*]]104; CHECK: [[IF_THEN10_5]]:105; CHECK-NEXT: br label %[[FOR_INC_5]]106; CHECK: [[FOR_INC_5]]:107; CHECK-NEXT: br i1 [[DOTNOT_6]], label %[[FOR_INC_6:.*]], label %[[IF_THEN10_6:.*]]108; CHECK: [[IF_THEN10_6]]:109; CHECK-NEXT: br label %[[FOR_INC_6]]110; CHECK: [[FOR_INC_6]]:111; CHECK-NEXT: br i1 [[DOTNOT_7]], label %[[FOR_INC_7:.*]], label %[[IF_THEN10_7:.*]]112; CHECK: [[IF_THEN10_7]]:113; CHECK-NEXT: br label %[[FOR_INC_7]]114; CHECK: [[FOR_INC_7]]:115; CHECK-NEXT: br i1 [[DOTNOT_8]], label %[[FOR_INC_8:.*]], label %[[IF_THEN10_8:.*]]116; CHECK: [[IF_THEN10_8]]:117; CHECK-NEXT: br label %[[FOR_INC_8]]118; CHECK: [[FOR_INC_8]]:119; CHECK-NEXT: br i1 [[DOTNOT_9]], label %[[WHILE_BODY]], label %[[IF_THEN10_9:.*]]120; CHECK: [[IF_THEN10_9]]:121; CHECK-NEXT: br label %[[WHILE_BODY]]122;123entry:124 %conv21 = sext i8 %0 to i32125 %conv7 = zext i32 %conv2 to i64126 %cond.i = shl i64 %conv7, %shl.i127 %1 = and i64 %cond.i, 4294967295128 %.not = icmp eq i64 %1, 1129 %conv7.1 = zext i32 %conv2 to i64130 %cond.i.1 = shl i64 %conv7.1, %shl.i131 %2 = and i64 %cond.i.1, 4294967295132 %.not.1 = icmp eq i64 %2, 1133 %sub.2 = or i32 %conv21, 1134 %cond.2 = select i1 %cmp.i, i32 %sub.2, i32 0135 %conv7.2 = zext i32 %cond.2 to i64136 %cmp.i.2 = icmp slt i32 %cond.2, 1137 %shl.i.2 = zext i1 %cmp.i.2 to i64138 %cond.i.2 = shl i64 %conv7.2, %shl.i.2139 %3 = and i64 %cond.i.2, 4294967295140 %.not.2 = icmp eq i64 %3, 1141 %sub.3 = or i32 %conv21, 1142 %cond.3 = select i1 %cmp.i, i32 %sub.3, i32 0143 %conv7.3 = zext i32 %cond.3 to i64144 %cmp.i.3 = icmp slt i32 %cond.3, 1145 %shl.i.3 = zext i1 %cmp.i.3 to i64146 %cond.i.3 = shl i64 %conv7.3, %shl.i.3147 %4 = and i64 %cond.i.3, 4294967295148 %.not.3 = icmp eq i64 %4, 1149 %sub.4 = or i32 %conv21, 1150 %cond.4 = select i1 %cmp.i, i32 %sub.4, i32 0151 %conv7.4 = zext i32 %cond.4 to i64152 %cmp.i.4 = icmp slt i32 %cond.4, 1153 %shl.i.4 = zext i1 %cmp.i.4 to i64154 %cond.i.4 = shl i64 %conv7.4, %shl.i.4155 %5 = and i64 %cond.i.4, 4294967295156 %.not.4 = icmp eq i64 %5, 1157 %sub.5 = or i32 %conv21, 1158 %cond.5 = select i1 %cmp.i, i32 %sub.5, i32 0159 %conv7.5 = zext i32 %cond.5 to i64160 %cmp.i.5 = icmp slt i32 %cond.5, 1161 %shl.i.5 = zext i1 %cmp.i.5 to i64162 %cond.i.5 = shl i64 %conv7.5, %shl.i.5163 %6 = and i64 %cond.i.5, 4294967295164 %.not.5 = icmp eq i64 %6, 1165 %sub.6 = or i32 %conv21, 1166 %cond.6 = select i1 %cmp.i, i32 %sub.6, i32 0167 %conv7.6 = zext i32 %cond.6 to i64168 %cmp.i.6 = icmp slt i32 %cond.6, 1169 %shl.i.6 = zext i1 %cmp.i.6 to i64170 %cond.i.6 = shl i64 %conv7.6, %shl.i.6171 %7 = and i64 %cond.i.6, 4294967295172 %.not.6 = icmp eq i64 %7, 1173 %sub.7 = or i32 %conv21, 1174 %cond.7 = select i1 %cmp.i, i32 %sub.7, i32 0175 %conv7.7 = zext i32 %cond.7 to i64176 %cmp.i.7 = icmp slt i32 %cond.7, 1177 %shl.i.7 = zext i1 %cmp.i.7 to i64178 %cond.i.7 = shl i64 %conv7.7, %shl.i.7179 %8 = and i64 %cond.i.7, 4294967295180 %.not.7 = icmp eq i64 %8, 1181 %sub.8 = or i32 %conv21, 1182 %cond.8 = select i1 %cmp.i, i32 %sub.8, i32 0183 %conv7.8 = zext i32 %cond.8 to i64184 %cmp.i.8 = icmp slt i32 %cond.8, 1185 %shl.i.8 = zext i1 %cmp.i.8 to i64186 %cond.i.8 = shl i64 %conv7.8, %shl.i.8187 %9 = and i64 %cond.i.8, 4294967295188 %.not.8 = icmp eq i64 %9, 1189 %sub.9 = or i32 %conv21, 1190 %cond.9 = select i1 %cmp.i, i32 %sub.9, i32 0191 %conv7.9 = zext i32 %cond.9 to i64192 %cmp.i.9 = icmp slt i32 %cond.9, 1193 %shl.i.9 = zext i1 %cmp.i.9 to i64194 %cond.i.9 = shl i64 %conv7.9, %shl.i.9195 %10 = and i64 %cond.i.9, 4294967295196 %.not.9 = icmp eq i64 %10, 1197 br label %while.body198 199while.body:200 br i1 %.not, label %for.inc, label %if.then10201 202if.then10:203 br label %for.inc204 205for.inc:206 br i1 %.not.1, label %for.inc.1, label %if.then10.1207 208if.then10.1:209 br label %for.inc.1210 211for.inc.1:212 br i1 %.not.2, label %for.inc.2, label %if.then10.2213 214if.then10.2:215 br label %for.inc.2216 217for.inc.2:218 br i1 %.not.3, label %for.inc.3, label %if.then10.3219 220if.then10.3:221 br label %for.inc.3222 223for.inc.3:224 br i1 %.not.4, label %for.inc.4, label %if.then10.4225 226if.then10.4:227 br label %for.inc.4228 229for.inc.4:230 br i1 %.not.5, label %for.inc.5, label %if.then10.5231 232if.then10.5:233 br label %for.inc.5234 235for.inc.5:236 br i1 %.not.6, label %for.inc.6, label %if.then10.6237 238if.then10.6:239 br label %for.inc.6240 241for.inc.6:242 br i1 %.not.7, label %for.inc.7, label %if.then10.7243 244if.then10.7:245 br label %for.inc.7246 247for.inc.7:248 br i1 %.not.8, label %for.inc.8, label %if.then10.8249 250if.then10.8:251 br label %for.inc.8252 253for.inc.8:254 br i1 %.not.9, label %while.body, label %if.then10.9255 256if.then10.9:257 br label %while.body258}259