Skip to content

Commit 93cc716

Browse files
committed
[VE] Change to use getVectorMinNumElements
In the commit 1e04923, getVectorNumElements is changed to denied for scalable vectors. This patch follows that modification.
1 parent fffff5c commit 93cc716

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/VE/VVPISelLowering.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ void VETargetLowering::initVPUActions() {
609609
// Short vector elements (EXCLUDING masks)
610610
for (MVT VT : MVT::vector_valuetypes()) {
611611
MVT ElemVT = VT.getVectorElementType();
612-
unsigned W = VT.getVectorNumElements();
612+
unsigned W = VT.getVectorMinNumElements();
613613

614614
// Use default splitting for vlens > 512
615615
if (W > PackedWidth)
@@ -722,7 +722,7 @@ void VETargetLowering::initVPUActions() {
722722
LegalizeAction Action;
723723
// FIXME query available vector width for this Op
724724
const unsigned WidthLimit = Subtarget->hasPackedMode() ? 512 : 256;
725-
if (isLegalVectorVT(VT) && VT.getVectorNumElements() <= WidthLimit) {
725+
if (isLegalVectorVT(VT) && VT.getVectorMinNumElements() <= WidthLimit) {
726726
// We perform custom widening as necessary
727727
Action = Custom;
728728
} else {
@@ -976,11 +976,11 @@ VETargetLowering::getPreferredVectorAction(MVT VT) const {
976976
return TypeScalarizeVector;
977977

978978
// The default action for one element vectors is to scalarize
979-
if (VT.getVectorNumElements() == 1)
979+
if (VT.getVectorMinNumElements() == 1)
980980
return TypeScalarizeVector;
981981

982982
// Split oversized vectors
983-
if (VT.getVectorNumElements() > 512)
983+
if (VT.getVectorMinNumElements() > 512)
984984
return TypeSplitVector;
985985

986986
// Promote short element vectors to i32

0 commit comments

Comments
 (0)