llvm.org GIT mirror llvm / 822b8da
[SLPVectorizer] Replace VL[0] to VL0 with assert, add propagateIRFlags extra parameter VL0, replace E->Scalars[0] to VL0, NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310904 91177308-0d34-0410-b5e6-96231b3b80d8 Dinar Temirbulatov 2 years ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
14231423
14241424 if (!BS.tryScheduleBundle(VL, this, VL0)) {
14251425 DEBUG(dbgs() << "SLP: We are not able to schedule this bundle!\n");
1426 assert((!BS.getScheduleData(VL[0]) ||
1427 !BS.getScheduleData(VL[0])->isPartOfBundle()) &&
1426 assert((!BS.getScheduleData(VL0) ||
1427 !BS.getScheduleData(VL0)->isPartOfBundle()) &&
14281428 "tryScheduleBundle should cancelScheduling on failure");
14291429 newTreeEntry(VL, false, UserTreeIdx);
14301430 return;
27962796 V = Builder.CreateICmp(P0, L, R);
27972797
27982798 E->VectorizedValue = V;
2799 propagateIRFlags(E->VectorizedValue, E->Scalars);
2799 propagateIRFlags(E->VectorizedValue, E->Scalars, VL0);
28002800 ++NumVectorInstructions;
28012801 return V;
28022802 }
28602860 BinaryOperator *BinOp = cast(VL0);
28612861 Value *V = Builder.CreateBinOp(BinOp->getOpcode(), LHS, RHS);
28622862 E->VectorizedValue = V;
2863 propagateIRFlags(E->VectorizedValue, E->Scalars);
2863 propagateIRFlags(E->VectorizedValue, E->Scalars, VL0);
28642864 ++NumVectorInstructions;
28652865
28662866 if (Instruction *I = dyn_cast(V))
29732973 // ctlz,cttz and powi are special intrinsics whose second argument is
29742974 // a scalar. This argument should not be vectorized.
29752975 if (hasVectorInstrinsicScalarOpd(IID, 1) && j == 1) {
2976 CallInst *CEI = cast(E->Scalars[0]);
2976 CallInst *CEI = cast(VL0);
29772977 ScalarArg = CEI->getArgOperand(j);
29782978 OpVecs.push_back(CEI->getArgOperand(j));
29792979 continue;
30033003 ExternalUses.push_back(ExternalUser(ScalarArg, cast(V), 0));
30043004
30053005 E->VectorizedValue = V;
3006 propagateIRFlags(E->VectorizedValue, E->Scalars);
3006 propagateIRFlags(E->VectorizedValue, E->Scalars, VL0);
30073007 ++NumVectorInstructions;
30083008 return V;
30093009 }
36723672 "tried to reset schedule on block which has not been scheduled");
36733673 for (Instruction *I = ScheduleStart; I != ScheduleEnd; I = I->getNextNode()) {
36743674 doForAllOpcodes(I, [this](ScheduleData *SD) {
3675 assert(isInSchedulingRegion(SD) &&
3675 assert(isInSchedulingRegion(SD) &&
36763676 "ScheduleData not in scheduling region");
36773677 SD->IsScheduled = false;
36783678 SD->resetUnscheduledDeps();