brintos

brintos / llvm-project-archived public Read only

0
0
Text · 57.4 KiB · 28b4672 Raw
891 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --version 62; RUN: opt -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=1 -prefer-predicate-over-epilogue=predicate-dont-vectorize -S %s | FileCheck --check-prefix=VF2IC1 %s3; RUN: opt -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=2 -prefer-predicate-over-epilogue=predicate-dont-vectorize -S %s | FileCheck --check-prefix=VF2IC2 %s4; RUN: opt -passes=loop-vectorize -force-vector-width=1 -force-vector-interleave=2 -prefer-predicate-over-epilogue=predicate-dont-vectorize -S %s | FileCheck --check-prefix=VF1IC2 %s5 6define i32 @FOR_used_outside(ptr noalias %A, ptr noalias %B, i64 %n) {7; VF2IC1-LABEL: define i32 @FOR_used_outside(8; VF2IC1-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {9; VF2IC1-NEXT:  [[ENTRY:.*:]]10; VF2IC1-NEXT:    br label %[[VECTOR_PH:.*]]11; VF2IC1:       [[VECTOR_PH]]:12; VF2IC1-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 113; VF2IC1-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 214; VF2IC1-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]15; VF2IC1-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 116; VF2IC1-NEXT:    [[BROADCAST_SPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[TRIP_COUNT_MINUS_1]], i64 017; VF2IC1-NEXT:    [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i64> [[BROADCAST_SPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer18; VF2IC1-NEXT:    br label %[[VECTOR_BODY:.*]]19; VF2IC1:       [[VECTOR_BODY]]:20; VF2IC1-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE4:.*]] ]21; VF2IC1-NEXT:    [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, %[[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], %[[PRED_STORE_CONTINUE4]] ]22; VF2IC1-NEXT:    [[VECTOR_RECUR:%.*]] = phi <2 x i32> [ <i32 poison, i32 33>, %[[VECTOR_PH]] ], [ [[TMP12:%.*]], %[[PRED_STORE_CONTINUE4]] ]23; VF2IC1-NEXT:    [[TMP1:%.*]] = add i64 [[INDEX]], 024; VF2IC1-NEXT:    [[TMP4:%.*]] = add i64 [[INDEX]], 125; VF2IC1-NEXT:    [[TMP2:%.*]] = icmp ule <2 x i64> [[VEC_IND]], [[BROADCAST_SPLAT]]26; VF2IC1-NEXT:    [[TMP3:%.*]] = extractelement <2 x i1> [[TMP2]], i32 027; VF2IC1-NEXT:    br i1 [[TMP3]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]28; VF2IC1:       [[PRED_LOAD_IF]]:29; VF2IC1-NEXT:    [[TMP9:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP1]]30; VF2IC1-NEXT:    [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 431; VF2IC1-NEXT:    [[TMP6:%.*]] = insertelement <2 x i32> poison, i32 [[TMP10]], i32 032; VF2IC1-NEXT:    br label %[[PRED_LOAD_CONTINUE]]33; VF2IC1:       [[PRED_LOAD_CONTINUE]]:34; VF2IC1-NEXT:    [[TMP7:%.*]] = phi <2 x i32> [ poison, %[[VECTOR_BODY]] ], [ [[TMP6]], %[[PRED_LOAD_IF]] ]35; VF2IC1-NEXT:    [[TMP8:%.*]] = extractelement <2 x i1> [[TMP2]], i32 136; VF2IC1-NEXT:    br i1 [[TMP8]], label %[[PRED_LOAD_IF1:.*]], label %[[PRED_LOAD_CONTINUE2:.*]]37; VF2IC1:       [[PRED_LOAD_IF1]]:38; VF2IC1-NEXT:    [[TMP33:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP4]]39; VF2IC1-NEXT:    [[TMP34:%.*]] = load i32, ptr [[TMP33]], align 440; VF2IC1-NEXT:    [[TMP11:%.*]] = insertelement <2 x i32> [[TMP7]], i32 [[TMP34]], i32 141; VF2IC1-NEXT:    br label %[[PRED_LOAD_CONTINUE2]]42; VF2IC1:       [[PRED_LOAD_CONTINUE2]]:43; VF2IC1-NEXT:    [[TMP12]] = phi <2 x i32> [ [[TMP7]], %[[PRED_LOAD_CONTINUE]] ], [ [[TMP11]], %[[PRED_LOAD_IF1]] ]44; VF2IC1-NEXT:    [[TMP13:%.*]] = shufflevector <2 x i32> [[VECTOR_RECUR]], <2 x i32> [[TMP12]], <2 x i32> <i32 1, i32 2>45; VF2IC1-NEXT:    [[TMP14:%.*]] = extractelement <2 x i1> [[TMP2]], i32 046; VF2IC1-NEXT:    br i1 [[TMP14]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]47; VF2IC1:       [[PRED_STORE_IF]]:48; VF2IC1-NEXT:    [[TMP15:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP1]]49; VF2IC1-NEXT:    [[TMP16:%.*]] = extractelement <2 x i32> [[TMP13]], i32 050; VF2IC1-NEXT:    [[TMP17:%.*]] = extractelement <2 x i32> [[TMP12]], i32 051; VF2IC1-NEXT:    [[TMP18:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]52; VF2IC1-NEXT:    store i32 [[TMP18]], ptr [[TMP15]], align 453; VF2IC1-NEXT:    br label %[[PRED_STORE_CONTINUE]]54; VF2IC1:       [[PRED_STORE_CONTINUE]]:55; VF2IC1-NEXT:    [[TMP19:%.*]] = extractelement <2 x i1> [[TMP2]], i32 156; VF2IC1-NEXT:    br i1 [[TMP19]], label %[[PRED_STORE_IF3:.*]], label %[[PRED_STORE_CONTINUE4]]57; VF2IC1:       [[PRED_STORE_IF3]]:58; VF2IC1-NEXT:    [[TMP20:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP4]]59; VF2IC1-NEXT:    [[TMP21:%.*]] = extractelement <2 x i32> [[TMP13]], i32 160; VF2IC1-NEXT:    [[TMP22:%.*]] = extractelement <2 x i32> [[TMP12]], i32 161; VF2IC1-NEXT:    [[TMP23:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]62; VF2IC1-NEXT:    store i32 [[TMP23]], ptr [[TMP20]], align 463; VF2IC1-NEXT:    br label %[[PRED_STORE_CONTINUE4]]64; VF2IC1:       [[PRED_STORE_CONTINUE4]]:65; VF2IC1-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX]], 266; VF2IC1-NEXT:    [[VEC_IND_NEXT]] = add <2 x i64> [[VEC_IND]], splat (i64 2)67; VF2IC1-NEXT:    [[TMP24:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]68; VF2IC1-NEXT:    br i1 [[TMP24]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]69; VF2IC1:       [[MIDDLE_BLOCK]]:70; VF2IC1-NEXT:    [[TMP25:%.*]] = xor <2 x i1> [[TMP2]], splat (i1 true)71; VF2IC1-NEXT:    [[TMP26:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP25]], i1 false)72; VF2IC1-NEXT:    [[TMP27:%.*]] = sub i64 [[TMP26]], 173; VF2IC1-NEXT:    [[TMP28:%.*]] = sub i64 [[TMP27]], 174; VF2IC1-NEXT:    [[TMP29:%.*]] = extractelement <2 x i32> [[TMP12]], i64 [[TMP28]]75; VF2IC1-NEXT:    [[TMP30:%.*]] = extractelement <2 x i32> [[VECTOR_RECUR]], i32 176; VF2IC1-NEXT:    [[TMP31:%.*]] = icmp eq i64 [[TMP27]], 077; VF2IC1-NEXT:    [[TMP32:%.*]] = select i1 [[TMP31]], i32 [[TMP30]], i32 [[TMP29]]78; VF2IC1-NEXT:    br label %[[FOR_END:.*]]79; VF2IC1:       [[FOR_END]]:80; VF2IC1-NEXT:    ret i32 [[TMP32]]81;82; VF2IC2-LABEL: define i32 @FOR_used_outside(83; VF2IC2-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {84; VF2IC2-NEXT:  [[ENTRY:.*:]]85; VF2IC2-NEXT:    br label %[[VECTOR_PH:.*]]86; VF2IC2:       [[VECTOR_PH]]:87; VF2IC2-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 388; VF2IC2-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 489; VF2IC2-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]90; VF2IC2-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 191; VF2IC2-NEXT:    [[BROADCAST_SPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[TRIP_COUNT_MINUS_1]], i64 092; VF2IC2-NEXT:    [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i64> [[BROADCAST_SPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer93; VF2IC2-NEXT:    br label %[[VECTOR_BODY:.*]]94; VF2IC2:       [[VECTOR_BODY]]:95; VF2IC2-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE12:.*]] ]96; VF2IC2-NEXT:    [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, %[[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], %[[PRED_STORE_CONTINUE12]] ]97; VF2IC2-NEXT:    [[VECTOR_RECUR:%.*]] = phi <2 x i32> [ <i32 poison, i32 33>, %[[VECTOR_PH]] ], [ [[TMP25:%.*]], %[[PRED_STORE_CONTINUE12]] ]98; VF2IC2-NEXT:    [[STEP_ADD:%.*]] = add <2 x i64> [[VEC_IND]], splat (i64 2)99; VF2IC2-NEXT:    [[TMP3:%.*]] = add i64 [[INDEX]], 0100; VF2IC2-NEXT:    [[TMP1:%.*]] = add i64 [[INDEX]], 1101; VF2IC2-NEXT:    [[TMP2:%.*]] = add i64 [[INDEX]], 2102; VF2IC2-NEXT:    [[TMP7:%.*]] = add i64 [[INDEX]], 3103; VF2IC2-NEXT:    [[TMP4:%.*]] = icmp ule <2 x i64> [[VEC_IND]], [[BROADCAST_SPLAT]]104; VF2IC2-NEXT:    [[TMP5:%.*]] = icmp ule <2 x i64> [[STEP_ADD]], [[BROADCAST_SPLAT]]105; VF2IC2-NEXT:    [[TMP6:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0106; VF2IC2-NEXT:    br i1 [[TMP6]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]107; VF2IC2:       [[PRED_LOAD_IF]]:108; VF2IC2-NEXT:    [[TMP22:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP3]]109; VF2IC2-NEXT:    [[TMP23:%.*]] = load i32, ptr [[TMP22]], align 4110; VF2IC2-NEXT:    [[TMP9:%.*]] = insertelement <2 x i32> poison, i32 [[TMP23]], i32 0111; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE]]112; VF2IC2:       [[PRED_LOAD_CONTINUE]]:113; VF2IC2-NEXT:    [[TMP10:%.*]] = phi <2 x i32> [ poison, %[[VECTOR_BODY]] ], [ [[TMP9]], %[[PRED_LOAD_IF]] ]114; VF2IC2-NEXT:    [[TMP11:%.*]] = extractelement <2 x i1> [[TMP4]], i32 1115; VF2IC2-NEXT:    br i1 [[TMP11]], label %[[PRED_LOAD_IF1:.*]], label %[[PRED_LOAD_CONTINUE2:.*]]116; VF2IC2:       [[PRED_LOAD_IF1]]:117; VF2IC2-NEXT:    [[TMP12:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP1]]118; VF2IC2-NEXT:    [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4119; VF2IC2-NEXT:    [[TMP14:%.*]] = insertelement <2 x i32> [[TMP10]], i32 [[TMP13]], i32 1120; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE2]]121; VF2IC2:       [[PRED_LOAD_CONTINUE2]]:122; VF2IC2-NEXT:    [[TMP15:%.*]] = phi <2 x i32> [ [[TMP10]], %[[PRED_LOAD_CONTINUE]] ], [ [[TMP14]], %[[PRED_LOAD_IF1]] ]123; VF2IC2-NEXT:    [[TMP16:%.*]] = extractelement <2 x i1> [[TMP5]], i32 0124; VF2IC2-NEXT:    br i1 [[TMP16]], label %[[PRED_LOAD_IF3:.*]], label %[[PRED_LOAD_CONTINUE4:.*]]125; VF2IC2:       [[PRED_LOAD_IF3]]:126; VF2IC2-NEXT:    [[TMP17:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP2]]127; VF2IC2-NEXT:    [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4128; VF2IC2-NEXT:    [[TMP19:%.*]] = insertelement <2 x i32> poison, i32 [[TMP18]], i32 0129; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE4]]130; VF2IC2:       [[PRED_LOAD_CONTINUE4]]:131; VF2IC2-NEXT:    [[TMP20:%.*]] = phi <2 x i32> [ poison, %[[PRED_LOAD_CONTINUE2]] ], [ [[TMP19]], %[[PRED_LOAD_IF3]] ]132; VF2IC2-NEXT:    [[TMP21:%.*]] = extractelement <2 x i1> [[TMP5]], i32 1133; VF2IC2-NEXT:    br i1 [[TMP21]], label %[[PRED_LOAD_IF5:.*]], label %[[PRED_LOAD_CONTINUE6:.*]]134; VF2IC2:       [[PRED_LOAD_IF5]]:135; VF2IC2-NEXT:    [[TMP34:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP7]]136; VF2IC2-NEXT:    [[TMP37:%.*]] = load i32, ptr [[TMP34]], align 4137; VF2IC2-NEXT:    [[TMP24:%.*]] = insertelement <2 x i32> [[TMP20]], i32 [[TMP37]], i32 1138; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE6]]139; VF2IC2:       [[PRED_LOAD_CONTINUE6]]:140; VF2IC2-NEXT:    [[TMP25]] = phi <2 x i32> [ [[TMP20]], %[[PRED_LOAD_CONTINUE4]] ], [ [[TMP24]], %[[PRED_LOAD_IF5]] ]141; VF2IC2-NEXT:    [[TMP26:%.*]] = shufflevector <2 x i32> [[VECTOR_RECUR]], <2 x i32> [[TMP15]], <2 x i32> <i32 1, i32 2>142; VF2IC2-NEXT:    [[TMP27:%.*]] = shufflevector <2 x i32> [[TMP15]], <2 x i32> [[TMP25]], <2 x i32> <i32 1, i32 2>143; VF2IC2-NEXT:    [[TMP28:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0144; VF2IC2-NEXT:    br i1 [[TMP28]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]145; VF2IC2:       [[PRED_STORE_IF]]:146; VF2IC2-NEXT:    [[TMP29:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP3]]147; VF2IC2-NEXT:    [[TMP30:%.*]] = extractelement <2 x i32> [[TMP26]], i32 0148; VF2IC2-NEXT:    [[TMP31:%.*]] = extractelement <2 x i32> [[TMP15]], i32 0149; VF2IC2-NEXT:    [[TMP32:%.*]] = add nsw i32 [[TMP30]], [[TMP31]]150; VF2IC2-NEXT:    store i32 [[TMP32]], ptr [[TMP29]], align 4151; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE]]152; VF2IC2:       [[PRED_STORE_CONTINUE]]:153; VF2IC2-NEXT:    [[TMP33:%.*]] = extractelement <2 x i1> [[TMP4]], i32 1154; VF2IC2-NEXT:    br i1 [[TMP33]], label %[[PRED_STORE_IF7:.*]], label %[[PRED_STORE_CONTINUE8:.*]]155; VF2IC2:       [[PRED_STORE_IF7]]:156; VF2IC2-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP1]]157; VF2IC2-NEXT:    [[TMP35:%.*]] = extractelement <2 x i32> [[TMP26]], i32 1158; VF2IC2-NEXT:    [[TMP36:%.*]] = extractelement <2 x i32> [[TMP15]], i32 1159; VF2IC2-NEXT:    [[TMP47:%.*]] = add nsw i32 [[TMP35]], [[TMP36]]160; VF2IC2-NEXT:    store i32 [[TMP47]], ptr [[TMP44]], align 4161; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE8]]162; VF2IC2:       [[PRED_STORE_CONTINUE8]]:163; VF2IC2-NEXT:    [[TMP38:%.*]] = extractelement <2 x i1> [[TMP5]], i32 0164; VF2IC2-NEXT:    br i1 [[TMP38]], label %[[PRED_STORE_IF9:.*]], label %[[PRED_STORE_CONTINUE10:.*]]165; VF2IC2:       [[PRED_STORE_IF9]]:166; VF2IC2-NEXT:    [[TMP39:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP2]]167; VF2IC2-NEXT:    [[TMP40:%.*]] = extractelement <2 x i32> [[TMP27]], i32 0168; VF2IC2-NEXT:    [[TMP41:%.*]] = extractelement <2 x i32> [[TMP25]], i32 0169; VF2IC2-NEXT:    [[TMP42:%.*]] = add nsw i32 [[TMP40]], [[TMP41]]170; VF2IC2-NEXT:    store i32 [[TMP42]], ptr [[TMP39]], align 4171; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE10]]172; VF2IC2:       [[PRED_STORE_CONTINUE10]]:173; VF2IC2-NEXT:    [[TMP43:%.*]] = extractelement <2 x i1> [[TMP5]], i32 1174; VF2IC2-NEXT:    br i1 [[TMP43]], label %[[PRED_STORE_IF11:.*]], label %[[PRED_STORE_CONTINUE12]]175; VF2IC2:       [[PRED_STORE_IF11]]:176; VF2IC2-NEXT:    [[TMP67:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP7]]177; VF2IC2-NEXT:    [[TMP45:%.*]] = extractelement <2 x i32> [[TMP27]], i32 1178; VF2IC2-NEXT:    [[TMP46:%.*]] = extractelement <2 x i32> [[TMP25]], i32 1179; VF2IC2-NEXT:    [[TMP68:%.*]] = add nsw i32 [[TMP45]], [[TMP46]]180; VF2IC2-NEXT:    store i32 [[TMP68]], ptr [[TMP67]], align 4181; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE12]]182; VF2IC2:       [[PRED_STORE_CONTINUE12]]:183; VF2IC2-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX]], 4184; VF2IC2-NEXT:    [[VEC_IND_NEXT]] = add <2 x i64> [[STEP_ADD]], splat (i64 2)185; VF2IC2-NEXT:    [[TMP48:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]186; VF2IC2-NEXT:    br i1 [[TMP48]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]187; VF2IC2:       [[MIDDLE_BLOCK]]:188; VF2IC2-NEXT:    [[TMP49:%.*]] = xor <2 x i1> [[TMP4]], splat (i1 true)189; VF2IC2-NEXT:    [[TMP50:%.*]] = xor <2 x i1> [[TMP5]], splat (i1 true)190; VF2IC2-NEXT:    [[TMP51:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP50]], i1 false)191; VF2IC2-NEXT:    [[TMP52:%.*]] = add i64 2, [[TMP51]]192; VF2IC2-NEXT:    [[TMP53:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP49]], i1 false)193; VF2IC2-NEXT:    [[TMP54:%.*]] = add i64 0, [[TMP53]]194; VF2IC2-NEXT:    [[TMP55:%.*]] = icmp ne i64 [[TMP53]], 2195; VF2IC2-NEXT:    [[TMP56:%.*]] = select i1 [[TMP55]], i64 [[TMP54]], i64 [[TMP52]]196; VF2IC2-NEXT:    [[TMP57:%.*]] = sub i64 [[TMP56]], 1197; VF2IC2-NEXT:    [[TMP58:%.*]] = sub i64 [[TMP57]], 1198; VF2IC2-NEXT:    [[TMP59:%.*]] = extractelement <2 x i32> [[TMP15]], i64 [[TMP58]]199; VF2IC2-NEXT:    [[TMP60:%.*]] = sub i64 [[TMP58]], 2200; VF2IC2-NEXT:    [[TMP61:%.*]] = extractelement <2 x i32> [[TMP25]], i64 [[TMP60]]201; VF2IC2-NEXT:    [[TMP62:%.*]] = icmp uge i64 [[TMP58]], 2202; VF2IC2-NEXT:    [[TMP63:%.*]] = select i1 [[TMP62]], i32 [[TMP61]], i32 [[TMP59]]203; VF2IC2-NEXT:    [[TMP64:%.*]] = extractelement <2 x i32> [[VECTOR_RECUR]], i32 1204; VF2IC2-NEXT:    [[TMP65:%.*]] = icmp eq i64 [[TMP57]], 0205; VF2IC2-NEXT:    [[TMP66:%.*]] = select i1 [[TMP65]], i32 [[TMP64]], i32 [[TMP63]]206; VF2IC2-NEXT:    br label %[[FOR_END:.*]]207; VF2IC2:       [[FOR_END]]:208; VF2IC2-NEXT:    ret i32 [[TMP66]]209;210; VF1IC2-LABEL: define i32 @FOR_used_outside(211; VF1IC2-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {212; VF1IC2-NEXT:  [[ENTRY:.*:]]213; VF1IC2-NEXT:    br label %[[VECTOR_PH:.*]]214; VF1IC2:       [[VECTOR_PH]]:215; VF1IC2-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 1216; VF1IC2-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 2217; VF1IC2-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]218; VF1IC2-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 1219; VF1IC2-NEXT:    br label %[[VECTOR_BODY:.*]]220; VF1IC2:       [[VECTOR_BODY]]:221; VF1IC2-NEXT:    [[TMP0:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE5:.*]] ]222; VF1IC2-NEXT:    [[VECTOR_RECUR:%.*]] = phi i32 [ 33, %[[VECTOR_PH]] ], [ [[TMP8:%.*]], %[[PRED_STORE_CONTINUE5]] ]223; VF1IC2-NEXT:    [[TMP3:%.*]] = add i64 [[TMP0]], 1224; VF1IC2-NEXT:    [[VEC_IV:%.*]] = add i64 [[TMP0]], 0225; VF1IC2-NEXT:    [[VEC_IV1:%.*]] = add i64 [[TMP0]], 1226; VF1IC2-NEXT:    [[TMP1:%.*]] = icmp ule i64 [[VEC_IV]], [[TRIP_COUNT_MINUS_1]]227; VF1IC2-NEXT:    [[TMP2:%.*]] = icmp ule i64 [[VEC_IV1]], [[TRIP_COUNT_MINUS_1]]228; VF1IC2-NEXT:    br i1 [[TMP1]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]229; VF1IC2:       [[PRED_LOAD_IF]]:230; VF1IC2-NEXT:    [[TMP6:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP0]]231; VF1IC2-NEXT:    [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4232; VF1IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE]]233; VF1IC2:       [[PRED_LOAD_CONTINUE]]:234; VF1IC2-NEXT:    [[TMP5:%.*]] = phi i32 [ poison, %[[VECTOR_BODY]] ], [ [[TMP7]], %[[PRED_LOAD_IF]] ]235; VF1IC2-NEXT:    br i1 [[TMP2]], label %[[PRED_LOAD_IF2:.*]], label %[[PRED_LOAD_CONTINUE3:.*]]236; VF1IC2:       [[PRED_LOAD_IF2]]:237; VF1IC2-NEXT:    [[TMP31:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP3]]238; VF1IC2-NEXT:    [[TMP32:%.*]] = load i32, ptr [[TMP31]], align 4239; VF1IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE3]]240; VF1IC2:       [[PRED_LOAD_CONTINUE3]]:241; VF1IC2-NEXT:    [[TMP8]] = phi i32 [ poison, %[[PRED_LOAD_CONTINUE]] ], [ [[TMP32]], %[[PRED_LOAD_IF2]] ]242; VF1IC2-NEXT:    br i1 [[TMP1]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]243; VF1IC2:       [[PRED_STORE_IF]]:244; VF1IC2-NEXT:    [[TMP9:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP0]]245; VF1IC2-NEXT:    [[TMP10:%.*]] = add nsw i32 [[VECTOR_RECUR]], [[TMP5]]246; VF1IC2-NEXT:    store i32 [[TMP10]], ptr [[TMP9]], align 4247; VF1IC2-NEXT:    br label %[[PRED_STORE_CONTINUE]]248; VF1IC2:       [[PRED_STORE_CONTINUE]]:249; VF1IC2-NEXT:    br i1 [[TMP2]], label %[[PRED_STORE_IF4:.*]], label %[[PRED_STORE_CONTINUE5]]250; VF1IC2:       [[PRED_STORE_IF4]]:251; VF1IC2-NEXT:    [[TMP11:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP3]]252; VF1IC2-NEXT:    [[TMP12:%.*]] = add nsw i32 [[TMP5]], [[TMP8]]253; VF1IC2-NEXT:    store i32 [[TMP12]], ptr [[TMP11]], align 4254; VF1IC2-NEXT:    br label %[[PRED_STORE_CONTINUE5]]255; VF1IC2:       [[PRED_STORE_CONTINUE5]]:256; VF1IC2-NEXT:    [[INDEX_NEXT]] = add i64 [[TMP0]], 2257; VF1IC2-NEXT:    [[TMP13:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]258; VF1IC2-NEXT:    br i1 [[TMP13]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]259; VF1IC2:       [[MIDDLE_BLOCK]]:260; VF1IC2-NEXT:    [[TMP14:%.*]] = xor i1 [[TMP1]], true261; VF1IC2-NEXT:    [[TMP15:%.*]] = xor i1 [[TMP2]], true262; VF1IC2-NEXT:    [[TMP16:%.*]] = icmp eq i1 [[TMP15]], false263; VF1IC2-NEXT:    [[TMP17:%.*]] = zext i1 [[TMP16]] to i64264; VF1IC2-NEXT:    [[TMP18:%.*]] = add i64 1, [[TMP17]]265; VF1IC2-NEXT:    [[TMP19:%.*]] = icmp eq i1 [[TMP14]], false266; VF1IC2-NEXT:    [[TMP20:%.*]] = zext i1 [[TMP19]] to i64267; VF1IC2-NEXT:    [[TMP21:%.*]] = add i64 0, [[TMP20]]268; VF1IC2-NEXT:    [[TMP22:%.*]] = icmp ne i64 [[TMP20]], 1269; VF1IC2-NEXT:    [[TMP23:%.*]] = select i1 [[TMP22]], i64 [[TMP21]], i64 [[TMP18]]270; VF1IC2-NEXT:    [[TMP24:%.*]] = sub i64 [[TMP23]], 1271; VF1IC2-NEXT:    [[TMP25:%.*]] = sub i64 [[TMP24]], 1272; VF1IC2-NEXT:    [[TMP26:%.*]] = sub i64 [[TMP25]], 1273; VF1IC2-NEXT:    [[TMP27:%.*]] = icmp uge i64 [[TMP25]], 1274; VF1IC2-NEXT:    [[TMP28:%.*]] = select i1 [[TMP27]], i32 [[TMP8]], i32 [[TMP5]]275; VF1IC2-NEXT:    [[TMP29:%.*]] = icmp eq i64 [[TMP24]], 0276; VF1IC2-NEXT:    [[TMP30:%.*]] = select i1 [[TMP29]], i32 [[VECTOR_RECUR]], i32 [[TMP28]]277; VF1IC2-NEXT:    br label %[[FOR_END:.*]]278; VF1IC2:       [[FOR_END]]:279; VF1IC2-NEXT:    ret i32 [[TMP30]]280;281entry:282  br label %loop283 284loop:285  %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]286  %for = phi i32 [ 33, %entry ], [ %for.next, %loop ]287  %gep.A = getelementptr inbounds nuw i32, ptr %A, i64 %iv288  %for.next = load i32, ptr %gep.A, align 4289  %add = add nsw i32 %for, %for.next290  %gep.B = getelementptr inbounds nuw i32, ptr %B, i64 %iv291  store i32 %add, ptr %gep.B, align 4292  %iv.next = add nuw nsw i64 %iv, 1293  %ec = icmp eq i64 %iv.next, %n294  br i1 %ec, label %for.end, label %loop295 296for.end:297  ret i32 %for298}299 300define i32 @FOR_next_used_outside(ptr noalias %A, ptr noalias %B, i64 %n) {301; VF2IC1-LABEL: define i32 @FOR_next_used_outside(302; VF2IC1-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {303; VF2IC1-NEXT:  [[ENTRY:.*:]]304; VF2IC1-NEXT:    br label %[[VECTOR_PH:.*]]305; VF2IC1:       [[VECTOR_PH]]:306; VF2IC1-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 1307; VF2IC1-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 2308; VF2IC1-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]309; VF2IC1-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 1310; VF2IC1-NEXT:    [[BROADCAST_SPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[TRIP_COUNT_MINUS_1]], i64 0311; VF2IC1-NEXT:    [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i64> [[BROADCAST_SPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer312; VF2IC1-NEXT:    br label %[[VECTOR_BODY:.*]]313; VF2IC1:       [[VECTOR_BODY]]:314; VF2IC1-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE4:.*]] ]315; VF2IC1-NEXT:    [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, %[[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], %[[PRED_STORE_CONTINUE4]] ]316; VF2IC1-NEXT:    [[VECTOR_RECUR:%.*]] = phi <2 x i32> [ <i32 poison, i32 33>, %[[VECTOR_PH]] ], [ [[TMP12:%.*]], %[[PRED_STORE_CONTINUE4]] ]317; VF2IC1-NEXT:    [[TMP1:%.*]] = add i64 [[INDEX]], 0318; VF2IC1-NEXT:    [[TMP4:%.*]] = add i64 [[INDEX]], 1319; VF2IC1-NEXT:    [[TMP2:%.*]] = icmp ule <2 x i64> [[VEC_IND]], [[BROADCAST_SPLAT]]320; VF2IC1-NEXT:    [[TMP3:%.*]] = extractelement <2 x i1> [[TMP2]], i32 0321; VF2IC1-NEXT:    br i1 [[TMP3]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]322; VF2IC1:       [[PRED_LOAD_IF]]:323; VF2IC1-NEXT:    [[TMP9:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP1]]324; VF2IC1-NEXT:    [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4325; VF2IC1-NEXT:    [[TMP6:%.*]] = insertelement <2 x i32> poison, i32 [[TMP10]], i32 0326; VF2IC1-NEXT:    br label %[[PRED_LOAD_CONTINUE]]327; VF2IC1:       [[PRED_LOAD_CONTINUE]]:328; VF2IC1-NEXT:    [[TMP7:%.*]] = phi <2 x i32> [ poison, %[[VECTOR_BODY]] ], [ [[TMP6]], %[[PRED_LOAD_IF]] ]329; VF2IC1-NEXT:    [[TMP8:%.*]] = extractelement <2 x i1> [[TMP2]], i32 1330; VF2IC1-NEXT:    br i1 [[TMP8]], label %[[PRED_LOAD_IF1:.*]], label %[[PRED_LOAD_CONTINUE2:.*]]331; VF2IC1:       [[PRED_LOAD_IF1]]:332; VF2IC1-NEXT:    [[TMP29:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP4]]333; VF2IC1-NEXT:    [[TMP30:%.*]] = load i32, ptr [[TMP29]], align 4334; VF2IC1-NEXT:    [[TMP11:%.*]] = insertelement <2 x i32> [[TMP7]], i32 [[TMP30]], i32 1335; VF2IC1-NEXT:    br label %[[PRED_LOAD_CONTINUE2]]336; VF2IC1:       [[PRED_LOAD_CONTINUE2]]:337; VF2IC1-NEXT:    [[TMP12]] = phi <2 x i32> [ [[TMP7]], %[[PRED_LOAD_CONTINUE]] ], [ [[TMP11]], %[[PRED_LOAD_IF1]] ]338; VF2IC1-NEXT:    [[TMP13:%.*]] = shufflevector <2 x i32> [[VECTOR_RECUR]], <2 x i32> [[TMP12]], <2 x i32> <i32 1, i32 2>339; VF2IC1-NEXT:    [[TMP14:%.*]] = extractelement <2 x i1> [[TMP2]], i32 0340; VF2IC1-NEXT:    br i1 [[TMP14]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]341; VF2IC1:       [[PRED_STORE_IF]]:342; VF2IC1-NEXT:    [[TMP15:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP1]]343; VF2IC1-NEXT:    [[TMP16:%.*]] = extractelement <2 x i32> [[TMP13]], i32 0344; VF2IC1-NEXT:    [[TMP17:%.*]] = extractelement <2 x i32> [[TMP12]], i32 0345; VF2IC1-NEXT:    [[TMP18:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]346; VF2IC1-NEXT:    store i32 [[TMP18]], ptr [[TMP15]], align 4347; VF2IC1-NEXT:    br label %[[PRED_STORE_CONTINUE]]348; VF2IC1:       [[PRED_STORE_CONTINUE]]:349; VF2IC1-NEXT:    [[TMP19:%.*]] = extractelement <2 x i1> [[TMP2]], i32 1350; VF2IC1-NEXT:    br i1 [[TMP19]], label %[[PRED_STORE_IF3:.*]], label %[[PRED_STORE_CONTINUE4]]351; VF2IC1:       [[PRED_STORE_IF3]]:352; VF2IC1-NEXT:    [[TMP20:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP4]]353; VF2IC1-NEXT:    [[TMP21:%.*]] = extractelement <2 x i32> [[TMP13]], i32 1354; VF2IC1-NEXT:    [[TMP22:%.*]] = extractelement <2 x i32> [[TMP12]], i32 1355; VF2IC1-NEXT:    [[TMP23:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]356; VF2IC1-NEXT:    store i32 [[TMP23]], ptr [[TMP20]], align 4357; VF2IC1-NEXT:    br label %[[PRED_STORE_CONTINUE4]]358; VF2IC1:       [[PRED_STORE_CONTINUE4]]:359; VF2IC1-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX]], 2360; VF2IC1-NEXT:    [[VEC_IND_NEXT]] = add <2 x i64> [[VEC_IND]], splat (i64 2)361; VF2IC1-NEXT:    [[TMP24:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]362; VF2IC1-NEXT:    br i1 [[TMP24]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP3:![0-9]+]]363; VF2IC1:       [[MIDDLE_BLOCK]]:364; VF2IC1-NEXT:    [[TMP25:%.*]] = xor <2 x i1> [[TMP2]], splat (i1 true)365; VF2IC1-NEXT:    [[TMP26:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP25]], i1 false)366; VF2IC1-NEXT:    [[TMP27:%.*]] = sub i64 [[TMP26]], 1367; VF2IC1-NEXT:    [[TMP28:%.*]] = extractelement <2 x i32> [[TMP12]], i64 [[TMP27]]368; VF2IC1-NEXT:    br label %[[FOR_END:.*]]369; VF2IC1:       [[FOR_END]]:370; VF2IC1-NEXT:    ret i32 [[TMP28]]371;372; VF2IC2-LABEL: define i32 @FOR_next_used_outside(373; VF2IC2-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {374; VF2IC2-NEXT:  [[ENTRY:.*:]]375; VF2IC2-NEXT:    br label %[[VECTOR_PH:.*]]376; VF2IC2:       [[VECTOR_PH]]:377; VF2IC2-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 3378; VF2IC2-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 4379; VF2IC2-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]380; VF2IC2-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 1381; VF2IC2-NEXT:    [[BROADCAST_SPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[TRIP_COUNT_MINUS_1]], i64 0382; VF2IC2-NEXT:    [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i64> [[BROADCAST_SPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer383; VF2IC2-NEXT:    br label %[[VECTOR_BODY:.*]]384; VF2IC2:       [[VECTOR_BODY]]:385; VF2IC2-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE12:.*]] ]386; VF2IC2-NEXT:    [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, %[[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], %[[PRED_STORE_CONTINUE12]] ]387; VF2IC2-NEXT:    [[VECTOR_RECUR:%.*]] = phi <2 x i32> [ <i32 poison, i32 33>, %[[VECTOR_PH]] ], [ [[TMP25:%.*]], %[[PRED_STORE_CONTINUE12]] ]388; VF2IC2-NEXT:    [[STEP_ADD:%.*]] = add <2 x i64> [[VEC_IND]], splat (i64 2)389; VF2IC2-NEXT:    [[TMP3:%.*]] = add i64 [[INDEX]], 0390; VF2IC2-NEXT:    [[TMP1:%.*]] = add i64 [[INDEX]], 1391; VF2IC2-NEXT:    [[TMP2:%.*]] = add i64 [[INDEX]], 2392; VF2IC2-NEXT:    [[TMP7:%.*]] = add i64 [[INDEX]], 3393; VF2IC2-NEXT:    [[TMP4:%.*]] = icmp ule <2 x i64> [[VEC_IND]], [[BROADCAST_SPLAT]]394; VF2IC2-NEXT:    [[TMP5:%.*]] = icmp ule <2 x i64> [[STEP_ADD]], [[BROADCAST_SPLAT]]395; VF2IC2-NEXT:    [[TMP6:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0396; VF2IC2-NEXT:    br i1 [[TMP6]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]397; VF2IC2:       [[PRED_LOAD_IF]]:398; VF2IC2-NEXT:    [[TMP22:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP3]]399; VF2IC2-NEXT:    [[TMP23:%.*]] = load i32, ptr [[TMP22]], align 4400; VF2IC2-NEXT:    [[TMP9:%.*]] = insertelement <2 x i32> poison, i32 [[TMP23]], i32 0401; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE]]402; VF2IC2:       [[PRED_LOAD_CONTINUE]]:403; VF2IC2-NEXT:    [[TMP10:%.*]] = phi <2 x i32> [ poison, %[[VECTOR_BODY]] ], [ [[TMP9]], %[[PRED_LOAD_IF]] ]404; VF2IC2-NEXT:    [[TMP11:%.*]] = extractelement <2 x i1> [[TMP4]], i32 1405; VF2IC2-NEXT:    br i1 [[TMP11]], label %[[PRED_LOAD_IF1:.*]], label %[[PRED_LOAD_CONTINUE2:.*]]406; VF2IC2:       [[PRED_LOAD_IF1]]:407; VF2IC2-NEXT:    [[TMP12:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP1]]408; VF2IC2-NEXT:    [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4409; VF2IC2-NEXT:    [[TMP14:%.*]] = insertelement <2 x i32> [[TMP10]], i32 [[TMP13]], i32 1410; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE2]]411; VF2IC2:       [[PRED_LOAD_CONTINUE2]]:412; VF2IC2-NEXT:    [[TMP15:%.*]] = phi <2 x i32> [ [[TMP10]], %[[PRED_LOAD_CONTINUE]] ], [ [[TMP14]], %[[PRED_LOAD_IF1]] ]413; VF2IC2-NEXT:    [[TMP16:%.*]] = extractelement <2 x i1> [[TMP5]], i32 0414; VF2IC2-NEXT:    br i1 [[TMP16]], label %[[PRED_LOAD_IF3:.*]], label %[[PRED_LOAD_CONTINUE4:.*]]415; VF2IC2:       [[PRED_LOAD_IF3]]:416; VF2IC2-NEXT:    [[TMP17:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP2]]417; VF2IC2-NEXT:    [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4418; VF2IC2-NEXT:    [[TMP19:%.*]] = insertelement <2 x i32> poison, i32 [[TMP18]], i32 0419; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE4]]420; VF2IC2:       [[PRED_LOAD_CONTINUE4]]:421; VF2IC2-NEXT:    [[TMP20:%.*]] = phi <2 x i32> [ poison, %[[PRED_LOAD_CONTINUE2]] ], [ [[TMP19]], %[[PRED_LOAD_IF3]] ]422; VF2IC2-NEXT:    [[TMP21:%.*]] = extractelement <2 x i1> [[TMP5]], i32 1423; VF2IC2-NEXT:    br i1 [[TMP21]], label %[[PRED_LOAD_IF5:.*]], label %[[PRED_LOAD_CONTINUE6:.*]]424; VF2IC2:       [[PRED_LOAD_IF5]]:425; VF2IC2-NEXT:    [[TMP34:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP7]]426; VF2IC2-NEXT:    [[TMP37:%.*]] = load i32, ptr [[TMP34]], align 4427; VF2IC2-NEXT:    [[TMP24:%.*]] = insertelement <2 x i32> [[TMP20]], i32 [[TMP37]], i32 1428; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE6]]429; VF2IC2:       [[PRED_LOAD_CONTINUE6]]:430; VF2IC2-NEXT:    [[TMP25]] = phi <2 x i32> [ [[TMP20]], %[[PRED_LOAD_CONTINUE4]] ], [ [[TMP24]], %[[PRED_LOAD_IF5]] ]431; VF2IC2-NEXT:    [[TMP26:%.*]] = shufflevector <2 x i32> [[VECTOR_RECUR]], <2 x i32> [[TMP15]], <2 x i32> <i32 1, i32 2>432; VF2IC2-NEXT:    [[TMP27:%.*]] = shufflevector <2 x i32> [[TMP15]], <2 x i32> [[TMP25]], <2 x i32> <i32 1, i32 2>433; VF2IC2-NEXT:    [[TMP28:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0434; VF2IC2-NEXT:    br i1 [[TMP28]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]435; VF2IC2:       [[PRED_STORE_IF]]:436; VF2IC2-NEXT:    [[TMP29:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP3]]437; VF2IC2-NEXT:    [[TMP30:%.*]] = extractelement <2 x i32> [[TMP26]], i32 0438; VF2IC2-NEXT:    [[TMP31:%.*]] = extractelement <2 x i32> [[TMP15]], i32 0439; VF2IC2-NEXT:    [[TMP32:%.*]] = add nsw i32 [[TMP30]], [[TMP31]]440; VF2IC2-NEXT:    store i32 [[TMP32]], ptr [[TMP29]], align 4441; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE]]442; VF2IC2:       [[PRED_STORE_CONTINUE]]:443; VF2IC2-NEXT:    [[TMP33:%.*]] = extractelement <2 x i1> [[TMP4]], i32 1444; VF2IC2-NEXT:    br i1 [[TMP33]], label %[[PRED_STORE_IF7:.*]], label %[[PRED_STORE_CONTINUE8:.*]]445; VF2IC2:       [[PRED_STORE_IF7]]:446; VF2IC2-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP1]]447; VF2IC2-NEXT:    [[TMP35:%.*]] = extractelement <2 x i32> [[TMP26]], i32 1448; VF2IC2-NEXT:    [[TMP36:%.*]] = extractelement <2 x i32> [[TMP15]], i32 1449; VF2IC2-NEXT:    [[TMP47:%.*]] = add nsw i32 [[TMP35]], [[TMP36]]450; VF2IC2-NEXT:    store i32 [[TMP47]], ptr [[TMP44]], align 4451; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE8]]452; VF2IC2:       [[PRED_STORE_CONTINUE8]]:453; VF2IC2-NEXT:    [[TMP38:%.*]] = extractelement <2 x i1> [[TMP5]], i32 0454; VF2IC2-NEXT:    br i1 [[TMP38]], label %[[PRED_STORE_IF9:.*]], label %[[PRED_STORE_CONTINUE10:.*]]455; VF2IC2:       [[PRED_STORE_IF9]]:456; VF2IC2-NEXT:    [[TMP39:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP2]]457; VF2IC2-NEXT:    [[TMP40:%.*]] = extractelement <2 x i32> [[TMP27]], i32 0458; VF2IC2-NEXT:    [[TMP41:%.*]] = extractelement <2 x i32> [[TMP25]], i32 0459; VF2IC2-NEXT:    [[TMP42:%.*]] = add nsw i32 [[TMP40]], [[TMP41]]460; VF2IC2-NEXT:    store i32 [[TMP42]], ptr [[TMP39]], align 4461; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE10]]462; VF2IC2:       [[PRED_STORE_CONTINUE10]]:463; VF2IC2-NEXT:    [[TMP43:%.*]] = extractelement <2 x i1> [[TMP5]], i32 1464; VF2IC2-NEXT:    br i1 [[TMP43]], label %[[PRED_STORE_IF11:.*]], label %[[PRED_STORE_CONTINUE12]]465; VF2IC2:       [[PRED_STORE_IF11]]:466; VF2IC2-NEXT:    [[TMP63:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP7]]467; VF2IC2-NEXT:    [[TMP45:%.*]] = extractelement <2 x i32> [[TMP27]], i32 1468; VF2IC2-NEXT:    [[TMP46:%.*]] = extractelement <2 x i32> [[TMP25]], i32 1469; VF2IC2-NEXT:    [[TMP64:%.*]] = add nsw i32 [[TMP45]], [[TMP46]]470; VF2IC2-NEXT:    store i32 [[TMP64]], ptr [[TMP63]], align 4471; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE12]]472; VF2IC2:       [[PRED_STORE_CONTINUE12]]:473; VF2IC2-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX]], 4474; VF2IC2-NEXT:    [[VEC_IND_NEXT]] = add <2 x i64> [[STEP_ADD]], splat (i64 2)475; VF2IC2-NEXT:    [[TMP48:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]476; VF2IC2-NEXT:    br i1 [[TMP48]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP3:![0-9]+]]477; VF2IC2:       [[MIDDLE_BLOCK]]:478; VF2IC2-NEXT:    [[TMP49:%.*]] = xor <2 x i1> [[TMP4]], splat (i1 true)479; VF2IC2-NEXT:    [[TMP50:%.*]] = xor <2 x i1> [[TMP5]], splat (i1 true)480; VF2IC2-NEXT:    [[TMP51:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP50]], i1 false)481; VF2IC2-NEXT:    [[TMP52:%.*]] = add i64 2, [[TMP51]]482; VF2IC2-NEXT:    [[TMP53:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP49]], i1 false)483; VF2IC2-NEXT:    [[TMP54:%.*]] = add i64 0, [[TMP53]]484; VF2IC2-NEXT:    [[TMP55:%.*]] = icmp ne i64 [[TMP53]], 2485; VF2IC2-NEXT:    [[TMP56:%.*]] = select i1 [[TMP55]], i64 [[TMP54]], i64 [[TMP52]]486; VF2IC2-NEXT:    [[TMP57:%.*]] = sub i64 [[TMP56]], 1487; VF2IC2-NEXT:    [[TMP58:%.*]] = extractelement <2 x i32> [[TMP15]], i64 [[TMP57]]488; VF2IC2-NEXT:    [[TMP59:%.*]] = sub i64 [[TMP57]], 2489; VF2IC2-NEXT:    [[TMP60:%.*]] = extractelement <2 x i32> [[TMP25]], i64 [[TMP59]]490; VF2IC2-NEXT:    [[TMP61:%.*]] = icmp uge i64 [[TMP57]], 2491; VF2IC2-NEXT:    [[TMP62:%.*]] = select i1 [[TMP61]], i32 [[TMP60]], i32 [[TMP58]]492; VF2IC2-NEXT:    br label %[[FOR_END:.*]]493; VF2IC2:       [[FOR_END]]:494; VF2IC2-NEXT:    ret i32 [[TMP62]]495;496; VF1IC2-LABEL: define i32 @FOR_next_used_outside(497; VF1IC2-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {498; VF1IC2-NEXT:  [[ENTRY:.*:]]499; VF1IC2-NEXT:    br label %[[VECTOR_PH:.*]]500; VF1IC2:       [[VECTOR_PH]]:501; VF1IC2-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 1502; VF1IC2-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 2503; VF1IC2-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]504; VF1IC2-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 1505; VF1IC2-NEXT:    br label %[[VECTOR_BODY:.*]]506; VF1IC2:       [[VECTOR_BODY]]:507; VF1IC2-NEXT:    [[TMP0:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE5:.*]] ]508; VF1IC2-NEXT:    [[VECTOR_RECUR:%.*]] = phi i32 [ 33, %[[VECTOR_PH]] ], [ [[TMP8:%.*]], %[[PRED_STORE_CONTINUE5]] ]509; VF1IC2-NEXT:    [[TMP3:%.*]] = add i64 [[TMP0]], 1510; VF1IC2-NEXT:    [[VEC_IV:%.*]] = add i64 [[TMP0]], 0511; VF1IC2-NEXT:    [[VEC_IV1:%.*]] = add i64 [[TMP0]], 1512; VF1IC2-NEXT:    [[TMP1:%.*]] = icmp ule i64 [[VEC_IV]], [[TRIP_COUNT_MINUS_1]]513; VF1IC2-NEXT:    [[TMP2:%.*]] = icmp ule i64 [[VEC_IV1]], [[TRIP_COUNT_MINUS_1]]514; VF1IC2-NEXT:    br i1 [[TMP1]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]515; VF1IC2:       [[PRED_LOAD_IF]]:516; VF1IC2-NEXT:    [[TMP6:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP0]]517; VF1IC2-NEXT:    [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4518; VF1IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE]]519; VF1IC2:       [[PRED_LOAD_CONTINUE]]:520; VF1IC2-NEXT:    [[TMP5:%.*]] = phi i32 [ poison, %[[VECTOR_BODY]] ], [ [[TMP7]], %[[PRED_LOAD_IF]] ]521; VF1IC2-NEXT:    br i1 [[TMP2]], label %[[PRED_LOAD_IF2:.*]], label %[[PRED_LOAD_CONTINUE3:.*]]522; VF1IC2:       [[PRED_LOAD_IF2]]:523; VF1IC2-NEXT:    [[TMP28:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP3]]524; VF1IC2-NEXT:    [[TMP29:%.*]] = load i32, ptr [[TMP28]], align 4525; VF1IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE3]]526; VF1IC2:       [[PRED_LOAD_CONTINUE3]]:527; VF1IC2-NEXT:    [[TMP8]] = phi i32 [ poison, %[[PRED_LOAD_CONTINUE]] ], [ [[TMP29]], %[[PRED_LOAD_IF2]] ]528; VF1IC2-NEXT:    br i1 [[TMP1]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]529; VF1IC2:       [[PRED_STORE_IF]]:530; VF1IC2-NEXT:    [[TMP9:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP0]]531; VF1IC2-NEXT:    [[TMP10:%.*]] = add nsw i32 [[VECTOR_RECUR]], [[TMP5]]532; VF1IC2-NEXT:    store i32 [[TMP10]], ptr [[TMP9]], align 4533; VF1IC2-NEXT:    br label %[[PRED_STORE_CONTINUE]]534; VF1IC2:       [[PRED_STORE_CONTINUE]]:535; VF1IC2-NEXT:    br i1 [[TMP2]], label %[[PRED_STORE_IF4:.*]], label %[[PRED_STORE_CONTINUE5]]536; VF1IC2:       [[PRED_STORE_IF4]]:537; VF1IC2-NEXT:    [[TMP11:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP3]]538; VF1IC2-NEXT:    [[TMP12:%.*]] = add nsw i32 [[TMP5]], [[TMP8]]539; VF1IC2-NEXT:    store i32 [[TMP12]], ptr [[TMP11]], align 4540; VF1IC2-NEXT:    br label %[[PRED_STORE_CONTINUE5]]541; VF1IC2:       [[PRED_STORE_CONTINUE5]]:542; VF1IC2-NEXT:    [[INDEX_NEXT]] = add i64 [[TMP0]], 2543; VF1IC2-NEXT:    [[TMP13:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]544; VF1IC2-NEXT:    br i1 [[TMP13]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP3:![0-9]+]]545; VF1IC2:       [[MIDDLE_BLOCK]]:546; VF1IC2-NEXT:    [[TMP14:%.*]] = xor i1 [[TMP1]], true547; VF1IC2-NEXT:    [[TMP15:%.*]] = xor i1 [[TMP2]], true548; VF1IC2-NEXT:    [[TMP16:%.*]] = icmp eq i1 [[TMP15]], false549; VF1IC2-NEXT:    [[TMP17:%.*]] = zext i1 [[TMP16]] to i64550; VF1IC2-NEXT:    [[TMP18:%.*]] = add i64 1, [[TMP17]]551; VF1IC2-NEXT:    [[TMP19:%.*]] = icmp eq i1 [[TMP14]], false552; VF1IC2-NEXT:    [[TMP20:%.*]] = zext i1 [[TMP19]] to i64553; VF1IC2-NEXT:    [[TMP21:%.*]] = add i64 0, [[TMP20]]554; VF1IC2-NEXT:    [[TMP22:%.*]] = icmp ne i64 [[TMP20]], 1555; VF1IC2-NEXT:    [[TMP23:%.*]] = select i1 [[TMP22]], i64 [[TMP21]], i64 [[TMP18]]556; VF1IC2-NEXT:    [[TMP24:%.*]] = sub i64 [[TMP23]], 1557; VF1IC2-NEXT:    [[TMP25:%.*]] = sub i64 [[TMP24]], 1558; VF1IC2-NEXT:    [[TMP26:%.*]] = icmp uge i64 [[TMP24]], 1559; VF1IC2-NEXT:    [[TMP27:%.*]] = select i1 [[TMP26]], i32 [[TMP8]], i32 [[TMP5]]560; VF1IC2-NEXT:    br label %[[FOR_END:.*]]561; VF1IC2:       [[FOR_END]]:562; VF1IC2-NEXT:    ret i32 [[TMP27]]563;564entry:565  br label %loop566 567loop:568  %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]569  %for = phi i32 [ 33, %entry ], [ %for.next, %loop ]570  %gep.A = getelementptr inbounds nuw i32, ptr %A, i64 %iv571  %for.next = load i32, ptr %gep.A, align 4572  %add = add nsw i32 %for, %for.next573  %gep.B = getelementptr inbounds nuw i32, ptr %B, i64 %iv574  store i32 %add, ptr %gep.B, align 4575  %iv.next = add nuw nsw i64 %iv, 1576  %ec = icmp eq i64 %iv.next, %n577  br i1 %ec, label %for.end, label %loop578 579for.end:580  ret i32 %for.next581}582 583define i32 @FOR_and_next_used_outside(ptr noalias %A, ptr noalias %B, i64 %n) {584; VF2IC1-LABEL: define i32 @FOR_and_next_used_outside(585; VF2IC1-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {586; VF2IC1-NEXT:  [[ENTRY:.*:]]587; VF2IC1-NEXT:    br label %[[VECTOR_PH:.*]]588; VF2IC1:       [[VECTOR_PH]]:589; VF2IC1-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 1590; VF2IC1-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 2591; VF2IC1-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]592; VF2IC1-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 1593; VF2IC1-NEXT:    [[BROADCAST_SPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[TRIP_COUNT_MINUS_1]], i64 0594; VF2IC1-NEXT:    [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i64> [[BROADCAST_SPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer595; VF2IC1-NEXT:    br label %[[VECTOR_BODY:.*]]596; VF2IC1:       [[VECTOR_BODY]]:597; VF2IC1-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE4:.*]] ]598; VF2IC1-NEXT:    [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, %[[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], %[[PRED_STORE_CONTINUE4]] ]599; VF2IC1-NEXT:    [[VECTOR_RECUR:%.*]] = phi <2 x i32> [ <i32 poison, i32 33>, %[[VECTOR_PH]] ], [ [[TMP12:%.*]], %[[PRED_STORE_CONTINUE4]] ]600; VF2IC1-NEXT:    [[TMP1:%.*]] = add i64 [[INDEX]], 0601; VF2IC1-NEXT:    [[TMP4:%.*]] = add i64 [[INDEX]], 1602; VF2IC1-NEXT:    [[TMP2:%.*]] = icmp ule <2 x i64> [[VEC_IND]], [[BROADCAST_SPLAT]]603; VF2IC1-NEXT:    [[TMP3:%.*]] = extractelement <2 x i1> [[TMP2]], i32 0604; VF2IC1-NEXT:    br i1 [[TMP3]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]605; VF2IC1:       [[PRED_LOAD_IF]]:606; VF2IC1-NEXT:    [[TMP9:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP1]]607; VF2IC1-NEXT:    [[TMP10:%.*]] = load i32, ptr [[TMP9]], align 4608; VF2IC1-NEXT:    [[TMP6:%.*]] = insertelement <2 x i32> poison, i32 [[TMP10]], i32 0609; VF2IC1-NEXT:    br label %[[PRED_LOAD_CONTINUE]]610; VF2IC1:       [[PRED_LOAD_CONTINUE]]:611; VF2IC1-NEXT:    [[TMP7:%.*]] = phi <2 x i32> [ poison, %[[VECTOR_BODY]] ], [ [[TMP6]], %[[PRED_LOAD_IF]] ]612; VF2IC1-NEXT:    [[TMP8:%.*]] = extractelement <2 x i1> [[TMP2]], i32 1613; VF2IC1-NEXT:    br i1 [[TMP8]], label %[[PRED_LOAD_IF1:.*]], label %[[PRED_LOAD_CONTINUE2:.*]]614; VF2IC1:       [[PRED_LOAD_IF1]]:615; VF2IC1-NEXT:    [[TMP34:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP4]]616; VF2IC1-NEXT:    [[TMP35:%.*]] = load i32, ptr [[TMP34]], align 4617; VF2IC1-NEXT:    [[TMP11:%.*]] = insertelement <2 x i32> [[TMP7]], i32 [[TMP35]], i32 1618; VF2IC1-NEXT:    br label %[[PRED_LOAD_CONTINUE2]]619; VF2IC1:       [[PRED_LOAD_CONTINUE2]]:620; VF2IC1-NEXT:    [[TMP12]] = phi <2 x i32> [ [[TMP7]], %[[PRED_LOAD_CONTINUE]] ], [ [[TMP11]], %[[PRED_LOAD_IF1]] ]621; VF2IC1-NEXT:    [[TMP13:%.*]] = shufflevector <2 x i32> [[VECTOR_RECUR]], <2 x i32> [[TMP12]], <2 x i32> <i32 1, i32 2>622; VF2IC1-NEXT:    [[TMP14:%.*]] = extractelement <2 x i1> [[TMP2]], i32 0623; VF2IC1-NEXT:    br i1 [[TMP14]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]624; VF2IC1:       [[PRED_STORE_IF]]:625; VF2IC1-NEXT:    [[TMP15:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP1]]626; VF2IC1-NEXT:    [[TMP16:%.*]] = extractelement <2 x i32> [[TMP13]], i32 0627; VF2IC1-NEXT:    [[TMP17:%.*]] = extractelement <2 x i32> [[TMP12]], i32 0628; VF2IC1-NEXT:    [[TMP18:%.*]] = add nsw i32 [[TMP16]], [[TMP17]]629; VF2IC1-NEXT:    store i32 [[TMP18]], ptr [[TMP15]], align 4630; VF2IC1-NEXT:    br label %[[PRED_STORE_CONTINUE]]631; VF2IC1:       [[PRED_STORE_CONTINUE]]:632; VF2IC1-NEXT:    [[TMP19:%.*]] = extractelement <2 x i1> [[TMP2]], i32 1633; VF2IC1-NEXT:    br i1 [[TMP19]], label %[[PRED_STORE_IF3:.*]], label %[[PRED_STORE_CONTINUE4]]634; VF2IC1:       [[PRED_STORE_IF3]]:635; VF2IC1-NEXT:    [[TMP20:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP4]]636; VF2IC1-NEXT:    [[TMP21:%.*]] = extractelement <2 x i32> [[TMP13]], i32 1637; VF2IC1-NEXT:    [[TMP22:%.*]] = extractelement <2 x i32> [[TMP12]], i32 1638; VF2IC1-NEXT:    [[TMP23:%.*]] = add nsw i32 [[TMP21]], [[TMP22]]639; VF2IC1-NEXT:    store i32 [[TMP23]], ptr [[TMP20]], align 4640; VF2IC1-NEXT:    br label %[[PRED_STORE_CONTINUE4]]641; VF2IC1:       [[PRED_STORE_CONTINUE4]]:642; VF2IC1-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX]], 2643; VF2IC1-NEXT:    [[VEC_IND_NEXT]] = add <2 x i64> [[VEC_IND]], splat (i64 2)644; VF2IC1-NEXT:    [[TMP24:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]645; VF2IC1-NEXT:    br i1 [[TMP24]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]646; VF2IC1:       [[MIDDLE_BLOCK]]:647; VF2IC1-NEXT:    [[TMP25:%.*]] = xor <2 x i1> [[TMP2]], splat (i1 true)648; VF2IC1-NEXT:    [[TMP26:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP25]], i1 false)649; VF2IC1-NEXT:    [[TMP27:%.*]] = sub i64 [[TMP26]], 1650; VF2IC1-NEXT:    [[TMP28:%.*]] = sub i64 [[TMP27]], 1651; VF2IC1-NEXT:    [[TMP29:%.*]] = extractelement <2 x i32> [[TMP12]], i64 [[TMP28]]652; VF2IC1-NEXT:    [[TMP30:%.*]] = extractelement <2 x i32> [[VECTOR_RECUR]], i32 1653; VF2IC1-NEXT:    [[TMP31:%.*]] = icmp eq i64 [[TMP27]], 0654; VF2IC1-NEXT:    [[TMP32:%.*]] = select i1 [[TMP31]], i32 [[TMP30]], i32 [[TMP29]]655; VF2IC1-NEXT:    [[TMP33:%.*]] = extractelement <2 x i32> [[TMP12]], i64 [[TMP27]]656; VF2IC1-NEXT:    br label %[[FOR_END:.*]]657; VF2IC1:       [[FOR_END]]:658; VF2IC1-NEXT:    [[RES:%.*]] = add i32 [[TMP32]], [[TMP33]]659; VF2IC1-NEXT:    ret i32 [[RES]]660;661; VF2IC2-LABEL: define i32 @FOR_and_next_used_outside(662; VF2IC2-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {663; VF2IC2-NEXT:  [[ENTRY:.*:]]664; VF2IC2-NEXT:    br label %[[VECTOR_PH:.*]]665; VF2IC2:       [[VECTOR_PH]]:666; VF2IC2-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 3667; VF2IC2-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 4668; VF2IC2-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]669; VF2IC2-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 1670; VF2IC2-NEXT:    [[BROADCAST_SPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[TRIP_COUNT_MINUS_1]], i64 0671; VF2IC2-NEXT:    [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i64> [[BROADCAST_SPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer672; VF2IC2-NEXT:    br label %[[VECTOR_BODY:.*]]673; VF2IC2:       [[VECTOR_BODY]]:674; VF2IC2-NEXT:    [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE12:.*]] ]675; VF2IC2-NEXT:    [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, %[[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], %[[PRED_STORE_CONTINUE12]] ]676; VF2IC2-NEXT:    [[VECTOR_RECUR:%.*]] = phi <2 x i32> [ <i32 poison, i32 33>, %[[VECTOR_PH]] ], [ [[TMP25:%.*]], %[[PRED_STORE_CONTINUE12]] ]677; VF2IC2-NEXT:    [[STEP_ADD:%.*]] = add <2 x i64> [[VEC_IND]], splat (i64 2)678; VF2IC2-NEXT:    [[TMP3:%.*]] = add i64 [[INDEX]], 0679; VF2IC2-NEXT:    [[TMP1:%.*]] = add i64 [[INDEX]], 1680; VF2IC2-NEXT:    [[TMP2:%.*]] = add i64 [[INDEX]], 2681; VF2IC2-NEXT:    [[TMP7:%.*]] = add i64 [[INDEX]], 3682; VF2IC2-NEXT:    [[TMP4:%.*]] = icmp ule <2 x i64> [[VEC_IND]], [[BROADCAST_SPLAT]]683; VF2IC2-NEXT:    [[TMP5:%.*]] = icmp ule <2 x i64> [[STEP_ADD]], [[BROADCAST_SPLAT]]684; VF2IC2-NEXT:    [[TMP6:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0685; VF2IC2-NEXT:    br i1 [[TMP6]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]686; VF2IC2:       [[PRED_LOAD_IF]]:687; VF2IC2-NEXT:    [[TMP22:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP3]]688; VF2IC2-NEXT:    [[TMP23:%.*]] = load i32, ptr [[TMP22]], align 4689; VF2IC2-NEXT:    [[TMP9:%.*]] = insertelement <2 x i32> poison, i32 [[TMP23]], i32 0690; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE]]691; VF2IC2:       [[PRED_LOAD_CONTINUE]]:692; VF2IC2-NEXT:    [[TMP10:%.*]] = phi <2 x i32> [ poison, %[[VECTOR_BODY]] ], [ [[TMP9]], %[[PRED_LOAD_IF]] ]693; VF2IC2-NEXT:    [[TMP11:%.*]] = extractelement <2 x i1> [[TMP4]], i32 1694; VF2IC2-NEXT:    br i1 [[TMP11]], label %[[PRED_LOAD_IF1:.*]], label %[[PRED_LOAD_CONTINUE2:.*]]695; VF2IC2:       [[PRED_LOAD_IF1]]:696; VF2IC2-NEXT:    [[TMP12:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP1]]697; VF2IC2-NEXT:    [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4698; VF2IC2-NEXT:    [[TMP14:%.*]] = insertelement <2 x i32> [[TMP10]], i32 [[TMP13]], i32 1699; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE2]]700; VF2IC2:       [[PRED_LOAD_CONTINUE2]]:701; VF2IC2-NEXT:    [[TMP15:%.*]] = phi <2 x i32> [ [[TMP10]], %[[PRED_LOAD_CONTINUE]] ], [ [[TMP14]], %[[PRED_LOAD_IF1]] ]702; VF2IC2-NEXT:    [[TMP16:%.*]] = extractelement <2 x i1> [[TMP5]], i32 0703; VF2IC2-NEXT:    br i1 [[TMP16]], label %[[PRED_LOAD_IF3:.*]], label %[[PRED_LOAD_CONTINUE4:.*]]704; VF2IC2:       [[PRED_LOAD_IF3]]:705; VF2IC2-NEXT:    [[TMP17:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP2]]706; VF2IC2-NEXT:    [[TMP18:%.*]] = load i32, ptr [[TMP17]], align 4707; VF2IC2-NEXT:    [[TMP19:%.*]] = insertelement <2 x i32> poison, i32 [[TMP18]], i32 0708; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE4]]709; VF2IC2:       [[PRED_LOAD_CONTINUE4]]:710; VF2IC2-NEXT:    [[TMP20:%.*]] = phi <2 x i32> [ poison, %[[PRED_LOAD_CONTINUE2]] ], [ [[TMP19]], %[[PRED_LOAD_IF3]] ]711; VF2IC2-NEXT:    [[TMP21:%.*]] = extractelement <2 x i1> [[TMP5]], i32 1712; VF2IC2-NEXT:    br i1 [[TMP21]], label %[[PRED_LOAD_IF5:.*]], label %[[PRED_LOAD_CONTINUE6:.*]]713; VF2IC2:       [[PRED_LOAD_IF5]]:714; VF2IC2-NEXT:    [[TMP34:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP7]]715; VF2IC2-NEXT:    [[TMP37:%.*]] = load i32, ptr [[TMP34]], align 4716; VF2IC2-NEXT:    [[TMP24:%.*]] = insertelement <2 x i32> [[TMP20]], i32 [[TMP37]], i32 1717; VF2IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE6]]718; VF2IC2:       [[PRED_LOAD_CONTINUE6]]:719; VF2IC2-NEXT:    [[TMP25]] = phi <2 x i32> [ [[TMP20]], %[[PRED_LOAD_CONTINUE4]] ], [ [[TMP24]], %[[PRED_LOAD_IF5]] ]720; VF2IC2-NEXT:    [[TMP26:%.*]] = shufflevector <2 x i32> [[VECTOR_RECUR]], <2 x i32> [[TMP15]], <2 x i32> <i32 1, i32 2>721; VF2IC2-NEXT:    [[TMP27:%.*]] = shufflevector <2 x i32> [[TMP15]], <2 x i32> [[TMP25]], <2 x i32> <i32 1, i32 2>722; VF2IC2-NEXT:    [[TMP28:%.*]] = extractelement <2 x i1> [[TMP4]], i32 0723; VF2IC2-NEXT:    br i1 [[TMP28]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]724; VF2IC2:       [[PRED_STORE_IF]]:725; VF2IC2-NEXT:    [[TMP29:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP3]]726; VF2IC2-NEXT:    [[TMP30:%.*]] = extractelement <2 x i32> [[TMP26]], i32 0727; VF2IC2-NEXT:    [[TMP31:%.*]] = extractelement <2 x i32> [[TMP15]], i32 0728; VF2IC2-NEXT:    [[TMP32:%.*]] = add nsw i32 [[TMP30]], [[TMP31]]729; VF2IC2-NEXT:    store i32 [[TMP32]], ptr [[TMP29]], align 4730; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE]]731; VF2IC2:       [[PRED_STORE_CONTINUE]]:732; VF2IC2-NEXT:    [[TMP33:%.*]] = extractelement <2 x i1> [[TMP4]], i32 1733; VF2IC2-NEXT:    br i1 [[TMP33]], label %[[PRED_STORE_IF7:.*]], label %[[PRED_STORE_CONTINUE8:.*]]734; VF2IC2:       [[PRED_STORE_IF7]]:735; VF2IC2-NEXT:    [[TMP44:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP1]]736; VF2IC2-NEXT:    [[TMP35:%.*]] = extractelement <2 x i32> [[TMP26]], i32 1737; VF2IC2-NEXT:    [[TMP36:%.*]] = extractelement <2 x i32> [[TMP15]], i32 1738; VF2IC2-NEXT:    [[TMP47:%.*]] = add nsw i32 [[TMP35]], [[TMP36]]739; VF2IC2-NEXT:    store i32 [[TMP47]], ptr [[TMP44]], align 4740; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE8]]741; VF2IC2:       [[PRED_STORE_CONTINUE8]]:742; VF2IC2-NEXT:    [[TMP38:%.*]] = extractelement <2 x i1> [[TMP5]], i32 0743; VF2IC2-NEXT:    br i1 [[TMP38]], label %[[PRED_STORE_IF9:.*]], label %[[PRED_STORE_CONTINUE10:.*]]744; VF2IC2:       [[PRED_STORE_IF9]]:745; VF2IC2-NEXT:    [[TMP39:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP2]]746; VF2IC2-NEXT:    [[TMP40:%.*]] = extractelement <2 x i32> [[TMP27]], i32 0747; VF2IC2-NEXT:    [[TMP41:%.*]] = extractelement <2 x i32> [[TMP25]], i32 0748; VF2IC2-NEXT:    [[TMP42:%.*]] = add nsw i32 [[TMP40]], [[TMP41]]749; VF2IC2-NEXT:    store i32 [[TMP42]], ptr [[TMP39]], align 4750; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE10]]751; VF2IC2:       [[PRED_STORE_CONTINUE10]]:752; VF2IC2-NEXT:    [[TMP43:%.*]] = extractelement <2 x i1> [[TMP5]], i32 1753; VF2IC2-NEXT:    br i1 [[TMP43]], label %[[PRED_STORE_IF11:.*]], label %[[PRED_STORE_CONTINUE12]]754; VF2IC2:       [[PRED_STORE_IF11]]:755; VF2IC2-NEXT:    [[TMP72:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP7]]756; VF2IC2-NEXT:    [[TMP45:%.*]] = extractelement <2 x i32> [[TMP27]], i32 1757; VF2IC2-NEXT:    [[TMP46:%.*]] = extractelement <2 x i32> [[TMP25]], i32 1758; VF2IC2-NEXT:    [[TMP73:%.*]] = add nsw i32 [[TMP45]], [[TMP46]]759; VF2IC2-NEXT:    store i32 [[TMP73]], ptr [[TMP72]], align 4760; VF2IC2-NEXT:    br label %[[PRED_STORE_CONTINUE12]]761; VF2IC2:       [[PRED_STORE_CONTINUE12]]:762; VF2IC2-NEXT:    [[INDEX_NEXT]] = add i64 [[INDEX]], 4763; VF2IC2-NEXT:    [[VEC_IND_NEXT]] = add <2 x i64> [[STEP_ADD]], splat (i64 2)764; VF2IC2-NEXT:    [[TMP48:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]765; VF2IC2-NEXT:    br i1 [[TMP48]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]766; VF2IC2:       [[MIDDLE_BLOCK]]:767; VF2IC2-NEXT:    [[TMP49:%.*]] = xor <2 x i1> [[TMP4]], splat (i1 true)768; VF2IC2-NEXT:    [[TMP50:%.*]] = xor <2 x i1> [[TMP5]], splat (i1 true)769; VF2IC2-NEXT:    [[TMP51:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP50]], i1 false)770; VF2IC2-NEXT:    [[TMP52:%.*]] = add i64 2, [[TMP51]]771; VF2IC2-NEXT:    [[TMP53:%.*]] = call i64 @llvm.experimental.cttz.elts.i64.v2i1(<2 x i1> [[TMP49]], i1 false)772; VF2IC2-NEXT:    [[TMP54:%.*]] = add i64 0, [[TMP53]]773; VF2IC2-NEXT:    [[TMP55:%.*]] = icmp ne i64 [[TMP53]], 2774; VF2IC2-NEXT:    [[TMP56:%.*]] = select i1 [[TMP55]], i64 [[TMP54]], i64 [[TMP52]]775; VF2IC2-NEXT:    [[TMP57:%.*]] = sub i64 [[TMP56]], 1776; VF2IC2-NEXT:    [[TMP58:%.*]] = sub i64 [[TMP57]], 1777; VF2IC2-NEXT:    [[TMP59:%.*]] = extractelement <2 x i32> [[TMP15]], i64 [[TMP58]]778; VF2IC2-NEXT:    [[TMP60:%.*]] = sub i64 [[TMP58]], 2779; VF2IC2-NEXT:    [[TMP61:%.*]] = extractelement <2 x i32> [[TMP25]], i64 [[TMP60]]780; VF2IC2-NEXT:    [[TMP62:%.*]] = icmp uge i64 [[TMP58]], 2781; VF2IC2-NEXT:    [[TMP63:%.*]] = select i1 [[TMP62]], i32 [[TMP61]], i32 [[TMP59]]782; VF2IC2-NEXT:    [[TMP64:%.*]] = extractelement <2 x i32> [[VECTOR_RECUR]], i32 1783; VF2IC2-NEXT:    [[TMP65:%.*]] = icmp eq i64 [[TMP57]], 0784; VF2IC2-NEXT:    [[TMP66:%.*]] = select i1 [[TMP65]], i32 [[TMP64]], i32 [[TMP63]]785; VF2IC2-NEXT:    [[TMP67:%.*]] = extractelement <2 x i32> [[TMP15]], i64 [[TMP57]]786; VF2IC2-NEXT:    [[TMP68:%.*]] = sub i64 [[TMP57]], 2787; VF2IC2-NEXT:    [[TMP69:%.*]] = extractelement <2 x i32> [[TMP25]], i64 [[TMP68]]788; VF2IC2-NEXT:    [[TMP70:%.*]] = icmp uge i64 [[TMP57]], 2789; VF2IC2-NEXT:    [[TMP71:%.*]] = select i1 [[TMP70]], i32 [[TMP69]], i32 [[TMP67]]790; VF2IC2-NEXT:    br label %[[FOR_END:.*]]791; VF2IC2:       [[FOR_END]]:792; VF2IC2-NEXT:    [[RES:%.*]] = add i32 [[TMP66]], [[TMP71]]793; VF2IC2-NEXT:    ret i32 [[RES]]794;795; VF1IC2-LABEL: define i32 @FOR_and_next_used_outside(796; VF1IC2-SAME: ptr noalias [[A:%.*]], ptr noalias [[B:%.*]], i64 [[N:%.*]]) {797; VF1IC2-NEXT:  [[ENTRY:.*:]]798; VF1IC2-NEXT:    br label %[[VECTOR_PH:.*]]799; VF1IC2:       [[VECTOR_PH]]:800; VF1IC2-NEXT:    [[N_RND_UP:%.*]] = add i64 [[N]], 1801; VF1IC2-NEXT:    [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 2802; VF1IC2-NEXT:    [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]803; VF1IC2-NEXT:    [[TRIP_COUNT_MINUS_1:%.*]] = sub i64 [[N]], 1804; VF1IC2-NEXT:    br label %[[VECTOR_BODY:.*]]805; VF1IC2:       [[VECTOR_BODY]]:806; VF1IC2-NEXT:    [[TMP0:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[PRED_STORE_CONTINUE5:.*]] ]807; VF1IC2-NEXT:    [[VECTOR_RECUR:%.*]] = phi i32 [ 33, %[[VECTOR_PH]] ], [ [[TMP8:%.*]], %[[PRED_STORE_CONTINUE5]] ]808; VF1IC2-NEXT:    [[TMP3:%.*]] = add i64 [[TMP0]], 1809; VF1IC2-NEXT:    [[VEC_IV:%.*]] = add i64 [[TMP0]], 0810; VF1IC2-NEXT:    [[VEC_IV1:%.*]] = add i64 [[TMP0]], 1811; VF1IC2-NEXT:    [[TMP1:%.*]] = icmp ule i64 [[VEC_IV]], [[TRIP_COUNT_MINUS_1]]812; VF1IC2-NEXT:    [[TMP2:%.*]] = icmp ule i64 [[VEC_IV1]], [[TRIP_COUNT_MINUS_1]]813; VF1IC2-NEXT:    br i1 [[TMP1]], label %[[PRED_LOAD_IF:.*]], label %[[PRED_LOAD_CONTINUE:.*]]814; VF1IC2:       [[PRED_LOAD_IF]]:815; VF1IC2-NEXT:    [[TMP6:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP0]]816; VF1IC2-NEXT:    [[TMP7:%.*]] = load i32, ptr [[TMP6]], align 4817; VF1IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE]]818; VF1IC2:       [[PRED_LOAD_CONTINUE]]:819; VF1IC2-NEXT:    [[TMP5:%.*]] = phi i32 [ poison, %[[VECTOR_BODY]] ], [ [[TMP7]], %[[PRED_LOAD_IF]] ]820; VF1IC2-NEXT:    br i1 [[TMP2]], label %[[PRED_LOAD_IF2:.*]], label %[[PRED_LOAD_CONTINUE3:.*]]821; VF1IC2:       [[PRED_LOAD_IF2]]:822; VF1IC2-NEXT:    [[TMP34:%.*]] = getelementptr inbounds nuw i32, ptr [[A]], i64 [[TMP3]]823; VF1IC2-NEXT:    [[TMP35:%.*]] = load i32, ptr [[TMP34]], align 4824; VF1IC2-NEXT:    br label %[[PRED_LOAD_CONTINUE3]]825; VF1IC2:       [[PRED_LOAD_CONTINUE3]]:826; VF1IC2-NEXT:    [[TMP8]] = phi i32 [ poison, %[[PRED_LOAD_CONTINUE]] ], [ [[TMP35]], %[[PRED_LOAD_IF2]] ]827; VF1IC2-NEXT:    br i1 [[TMP1]], label %[[PRED_STORE_IF:.*]], label %[[PRED_STORE_CONTINUE:.*]]828; VF1IC2:       [[PRED_STORE_IF]]:829; VF1IC2-NEXT:    [[TMP9:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP0]]830; VF1IC2-NEXT:    [[TMP10:%.*]] = add nsw i32 [[VECTOR_RECUR]], [[TMP5]]831; VF1IC2-NEXT:    store i32 [[TMP10]], ptr [[TMP9]], align 4832; VF1IC2-NEXT:    br label %[[PRED_STORE_CONTINUE]]833; VF1IC2:       [[PRED_STORE_CONTINUE]]:834; VF1IC2-NEXT:    br i1 [[TMP2]], label %[[PRED_STORE_IF4:.*]], label %[[PRED_STORE_CONTINUE5]]835; VF1IC2:       [[PRED_STORE_IF4]]:836; VF1IC2-NEXT:    [[TMP11:%.*]] = getelementptr inbounds nuw i32, ptr [[B]], i64 [[TMP3]]837; VF1IC2-NEXT:    [[TMP12:%.*]] = add nsw i32 [[TMP5]], [[TMP8]]838; VF1IC2-NEXT:    store i32 [[TMP12]], ptr [[TMP11]], align 4839; VF1IC2-NEXT:    br label %[[PRED_STORE_CONTINUE5]]840; VF1IC2:       [[PRED_STORE_CONTINUE5]]:841; VF1IC2-NEXT:    [[INDEX_NEXT]] = add i64 [[TMP0]], 2842; VF1IC2-NEXT:    [[TMP13:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]843; VF1IC2-NEXT:    br i1 [[TMP13]], label %[[MIDDLE_BLOCK:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]844; VF1IC2:       [[MIDDLE_BLOCK]]:845; VF1IC2-NEXT:    [[TMP14:%.*]] = xor i1 [[TMP1]], true846; VF1IC2-NEXT:    [[TMP15:%.*]] = xor i1 [[TMP2]], true847; VF1IC2-NEXT:    [[TMP16:%.*]] = icmp eq i1 [[TMP15]], false848; VF1IC2-NEXT:    [[TMP17:%.*]] = zext i1 [[TMP16]] to i64849; VF1IC2-NEXT:    [[TMP18:%.*]] = add i64 1, [[TMP17]]850; VF1IC2-NEXT:    [[TMP19:%.*]] = icmp eq i1 [[TMP14]], false851; VF1IC2-NEXT:    [[TMP20:%.*]] = zext i1 [[TMP19]] to i64852; VF1IC2-NEXT:    [[TMP21:%.*]] = add i64 0, [[TMP20]]853; VF1IC2-NEXT:    [[TMP22:%.*]] = icmp ne i64 [[TMP20]], 1854; VF1IC2-NEXT:    [[TMP23:%.*]] = select i1 [[TMP22]], i64 [[TMP21]], i64 [[TMP18]]855; VF1IC2-NEXT:    [[TMP24:%.*]] = sub i64 [[TMP23]], 1856; VF1IC2-NEXT:    [[TMP25:%.*]] = sub i64 [[TMP24]], 1857; VF1IC2-NEXT:    [[TMP26:%.*]] = sub i64 [[TMP25]], 1858; VF1IC2-NEXT:    [[TMP27:%.*]] = icmp uge i64 [[TMP25]], 1859; VF1IC2-NEXT:    [[TMP28:%.*]] = select i1 [[TMP27]], i32 [[TMP8]], i32 [[TMP5]]860; VF1IC2-NEXT:    [[TMP29:%.*]] = icmp eq i64 [[TMP24]], 0861; VF1IC2-NEXT:    [[TMP30:%.*]] = select i1 [[TMP29]], i32 [[VECTOR_RECUR]], i32 [[TMP28]]862; VF1IC2-NEXT:    [[TMP31:%.*]] = sub i64 [[TMP24]], 1863; VF1IC2-NEXT:    [[TMP32:%.*]] = icmp uge i64 [[TMP24]], 1864; VF1IC2-NEXT:    [[TMP33:%.*]] = select i1 [[TMP32]], i32 [[TMP8]], i32 [[TMP5]]865; VF1IC2-NEXT:    br label %[[FOR_END:.*]]866; VF1IC2:       [[FOR_END]]:867; VF1IC2-NEXT:    [[RES:%.*]] = add i32 [[TMP30]], [[TMP33]]868; VF1IC2-NEXT:    ret i32 [[RES]]869;870entry:871  br label %loop872 873loop:874  %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]875  %for = phi i32 [ 33, %entry ], [ %for.next, %loop ]876  %gep.A = getelementptr inbounds nuw i32, ptr %A, i64 %iv877  %for.next = load i32, ptr %gep.A, align 4878  %add = add nsw i32 %for, %for.next879  %gep.B = getelementptr inbounds nuw i32, ptr %B, i64 %iv880  store i32 %add, ptr %gep.B, align 4881  %iv.next = add nuw nsw i64 %iv, 1882  %ec = icmp eq i64 %iv.next, %n883  br i1 %ec, label %for.end, label %loop884 885for.end:886  %res = add i32 %for, %for.next887  ret i32 %res888}889 890 891