File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1364,8 +1364,13 @@ StringRef VPWidenIntrinsicRecipe::getIntrinsicName() const {
1364
1364
1365
1365
bool VPWidenIntrinsicRecipe::onlyFirstLaneUsed (const VPValue *Op) const {
1366
1366
assert (is_contained (operands (), Op) && " Op must be an operand of the recipe" );
1367
- unsigned Idx = std::distance (op_begin (), find (operands (), Op));
1368
- return isVectorIntrinsicWithScalarOpAtArg (VectorIntrinsicID, Idx, nullptr );
1367
+ for (auto [Idx, V] : enumerate(operands ())) {
1368
+ if (V != Op)
1369
+ continue ;
1370
+ if (!isVectorIntrinsicWithScalarOpAtArg (VectorIntrinsicID, Idx, nullptr ))
1371
+ return false ;
1372
+ }
1373
+ return true ;
1369
1374
}
1370
1375
1371
1376
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
You can’t perform that action at this time.
0 commit comments