@@ -4142,8 +4142,9 @@ class BoUpSLP {
4142
4142
// through the TreeEntry.
4143
4143
if (TreeEntry *TE = BundleMember->TE) {
4144
4144
// Need to search for the lane since the tree entry can be reordered.
4145
+ auto *In = BundleMember->Inst;
4145
4146
int Lane = std::distance(TE->Scalars.begin(),
4146
- find(TE->Scalars, BundleMember->Inst ));
4147
+ find(TE->Scalars, In ));
4147
4148
assert(Lane >= 0 && "Lane not set");
4148
4149
4149
4150
// Since vectorization tree is being built recursively this assertion
@@ -4152,16 +4153,13 @@ class BoUpSLP {
4152
4153
// where their second (immediate) operand is not added. Since
4153
4154
// immediates do not affect scheduler behavior this is considered
4154
4155
// okay.
4155
- auto *In = BundleMember->Inst;
4156
4156
assert(
4157
4157
In &&
4158
4158
(isa<ExtractValueInst, ExtractElementInst, IntrinsicInst>(In) ||
4159
4159
In->getNumOperands() == TE->getNumOperands()) &&
4160
4160
"Missed TreeEntry operands?");
4161
- (void)In; // fake use to avoid build failure when assertions disabled
4162
4161
4163
- for (unsigned OpIdx = 0, NumOperands = TE->getNumOperands();
4164
- OpIdx != NumOperands; ++OpIdx)
4162
+ for (unsigned OpIdx : seq<unsigned>(TE->getNumOperands()))
4165
4163
if (auto *I = dyn_cast<Instruction>(TE->getOperand(OpIdx)[Lane]))
4166
4164
DecrUnsched(I);
4167
4165
} else {
@@ -9093,7 +9091,7 @@ static bool isAlternateInstruction(const Instruction *I,
9093
9091
if (auto *MainCI = dyn_cast<CmpInst>(MainOp)) {
9094
9092
auto *AltCI = cast<CmpInst>(AltOp);
9095
9093
CmpInst::Predicate MainP = MainCI->getPredicate();
9096
- CmpInst::Predicate AltP = AltCI->getPredicate();
9094
+ [[maybe_unused]] CmpInst::Predicate AltP = AltCI->getPredicate();
9097
9095
assert(MainP != AltP && "Expected different main/alternate predicates.");
9098
9096
auto *CI = cast<CmpInst>(I);
9099
9097
if (isCmpSameOrSwapped(MainCI, CI, TLI))
@@ -9106,7 +9104,6 @@ static bool isAlternateInstruction(const Instruction *I,
9106
9104
assert((MainP == P || AltP == P || MainP == SwappedP || AltP == SwappedP) &&
9107
9105
"CmpInst expected to match either main or alternate predicate or "
9108
9106
"their swap.");
9109
- (void)AltP;
9110
9107
return MainP != P && MainP != SwappedP;
9111
9108
}
9112
9109
return I->getOpcode() == AltOp->getOpcode();
@@ -12379,8 +12376,7 @@ static T *performExtractsShuffleAction(
12379
12376
else
12380
12377
Mask[Idx] = (Res.second ? Idx : Mask[Idx]) + VF;
12381
12378
}
12382
- auto *V = ValueSelect::get<T *>(Base);
12383
- (void)V;
12379
+ [[maybe_unused]] auto *V = ValueSelect::get<T *>(Base);
12384
12380
assert((!V || GetVF(V) == Mask.size()) &&
12385
12381
"Expected base vector of VF number of elements.");
12386
12382
Prev = Action(Mask, {nullptr, Res.first});
@@ -12431,8 +12427,7 @@ static T *performExtractsShuffleAction(
12431
12427
}
12432
12428
VMIt = std::next(VMIt);
12433
12429
}
12434
- bool IsBaseNotUndef = !IsBaseUndef.all();
12435
- (void)IsBaseNotUndef;
12430
+ [[maybe_unused]] bool IsBaseNotUndef = !IsBaseUndef.all();
12436
12431
// Perform requested actions for the remaining masks/vectors.
12437
12432
for (auto E = ShuffleMask.end(); VMIt != E; ++VMIt) {
12438
12433
// Shuffle other input vectors, if any.
@@ -17626,8 +17621,7 @@ void BoUpSLP::scheduleBlock(BlockScheduling *BS) {
17626
17621
for (auto *I = BS->ScheduleStart; I != BS->ScheduleEnd;
17627
17622
I = I->getNextNode()) {
17628
17623
if (ScheduleData *SD = BS->getScheduleData(I)) {
17629
- TreeEntry *SDTE = getTreeEntry(SD->Inst);
17630
- (void)SDTE;
17624
+ [[maybe_unused]] TreeEntry *SDTE = getTreeEntry(SD->Inst);
17631
17625
assert((isVectorLikeInstWithConstOps(SD->Inst) ||
17632
17626
SD->isPartOfBundle() ==
17633
17627
(SDTE && !doesNotNeedToSchedule(SDTE->Scalars))) &&
0 commit comments