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 {
13641364
13651365bool VPWidenIntrinsicRecipe::onlyFirstLaneUsed (const VPValue *Op) const {
13661366 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 ;
13691374}
13701375
13711376#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
You can’t perform that action at this time.
0 commit comments