Skip to content

Commit b1c58d4

Browse files
[VPlan] Add ExplicitVectorLength to isSingleScalar
The docstring of this function: > Returns true if this VPInstruction's operands are single scalars and the > result is also a single scalar. ExplicitVectorLength fits this description. I don't have a test for it now, but it is needed by llvm#106560.
1 parent 18c79ca commit b1c58d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,8 @@ bool VPInstruction::isVectorToScalar() const {
680680
}
681681

682682
bool VPInstruction::isSingleScalar() const {
683-
return getOpcode() == VPInstruction::ResumePhi;
683+
return getOpcode() == VPInstruction::ResumePhi ||
684+
getOpcode() == VPInstruction::ExplicitVectorLength;
684685
}
685686

686687
#if !defined(NDEBUG)

0 commit comments

Comments
 (0)