if (!BS.tryScheduleBundle(VL, this, VL0)) {
DEBUG(dbgs() << "SLP: We are not able to schedule this bundle!\n");
- assert((!BS.getScheduleData(VL[0]) ||
- !BS.getScheduleData(VL[0])->isPartOfBundle()) &&
+ assert((!BS.getScheduleData(VL0) ||
+ !BS.getScheduleData(VL0)->isPartOfBundle()) &&
"tryScheduleBundle should cancelScheduling on failure");
newTreeEntry(VL, false, UserTreeIdx);
return;
V = Builder.CreateICmp(P0, L, R);
E->VectorizedValue = V;
- propagateIRFlags(E->VectorizedValue, E->Scalars);
+ propagateIRFlags(E->VectorizedValue, E->Scalars, VL0);
++NumVectorInstructions;
return V;
}
BinaryOperator *BinOp = cast<BinaryOperator>(VL0);
Value *V = Builder.CreateBinOp(BinOp->getOpcode(), LHS, RHS);
E->VectorizedValue = V;
- propagateIRFlags(E->VectorizedValue, E->Scalars);
+ propagateIRFlags(E->VectorizedValue, E->Scalars, VL0);
++NumVectorInstructions;
if (Instruction *I = dyn_cast<Instruction>(V))
// ctlz,cttz and powi are special intrinsics whose second argument is
// a scalar. This argument should not be vectorized.
if (hasVectorInstrinsicScalarOpd(IID, 1) && j == 1) {
- CallInst *CEI = cast<CallInst>(E->Scalars[0]);
+ CallInst *CEI = cast<CallInst>(VL0);
ScalarArg = CEI->getArgOperand(j);
OpVecs.push_back(CEI->getArgOperand(j));
continue;
ExternalUses.push_back(ExternalUser(ScalarArg, cast<User>(V), 0));
E->VectorizedValue = V;
- propagateIRFlags(E->VectorizedValue, E->Scalars);
+ propagateIRFlags(E->VectorizedValue, E->Scalars, VL0);
++NumVectorInstructions;
return V;
}
"tried to reset schedule on block which has not been scheduled");
for (Instruction *I = ScheduleStart; I != ScheduleEnd; I = I->getNextNode()) {
doForAllOpcodes(I, [this](ScheduleData *SD) {
- assert(isInSchedulingRegion(SD) &&
+ assert(isInSchedulingRegion(SD) &&
"ScheduleData not in scheduling region");
SD->IsScheduled = false;
SD->resetUnscheduledDeps();