File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -184,8 +184,7 @@ void VPPredicator::createSwitchEdgeMasks(VPInstruction *SI) {
184
184
VPValue *Cond = SI->getOperand (0 );
185
185
VPBasicBlock *DefaultDst = cast<VPBasicBlock>(Src->getSuccessors ()[0 ]);
186
186
MapVector<VPBasicBlock *, SmallVector<VPValue *>> Dst2Compares;
187
- for (const auto &[Idx, Succ] :
188
- enumerate(ArrayRef (Src->getSuccessors ()).drop_front ())) {
187
+ for (const auto &[Idx, Succ] : enumerate(drop_begin (Src->getSuccessors ()))) {
189
188
VPBasicBlock *Dst = cast<VPBasicBlock>(Succ);
190
189
assert (!getEdgeMask (Src, Dst) && " Edge masks already created" );
191
190
// Cases whose destination is the same as default are redundant and can
@@ -206,7 +205,7 @@ void VPPredicator::createSwitchEdgeMasks(VPInstruction *SI) {
206
205
// cases with destination == Dst are taken. Join the conditions for each
207
206
// case whose destination == Dst using an OR.
208
207
VPValue *Mask = Conds[0 ];
209
- for (VPValue *V : ArrayRef<VPValue *> (Conds). drop_front ( ))
208
+ for (VPValue *V : drop_begin (Conds))
210
209
Mask = Builder.createOr (Mask, V);
211
210
if (SrcMask)
212
211
Mask = Builder.createLogicalAnd (SrcMask, Mask);
You can’t perform that action at this time.
0 commit comments