[SVE] Remove getNumElements() calls in Verifier::visitIntrinsicCall

Replace getNumElements() with getElementCount() when asserting that
two types have the same element counts.

Differential Revision: https://reviews.llvm.org/D81371
This commit is contained in:
David Sherwood 2020-06-08 11:20:13 +01:00
parent 4c50cf9197
commit cda166c37c
1 changed files with 4 additions and 4 deletions

View File

@ -4855,8 +4855,8 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
"masked_load: return must match pointer type", Call);
Assert(PassThru->getType() == DataTy,
"masked_load: pass through and data type must match", Call);
Assert(cast<VectorType>(Mask->getType())->getNumElements() ==
cast<VectorType>(DataTy)->getNumElements(),
Assert(cast<VectorType>(Mask->getType())->getElementCount() ==
cast<VectorType>(DataTy)->getElementCount(),
"masked_load: vector mask must be same length as data", Call);
break;
}
@ -4874,8 +4874,8 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
Type *DataTy = cast<PointerType>(Ptr->getType())->getElementType();
Assert(DataTy == Val->getType(),
"masked_store: storee must match pointer type", Call);
Assert(cast<VectorType>(Mask->getType())->getNumElements() ==
cast<VectorType>(DataTy)->getNumElements(),
Assert(cast<VectorType>(Mask->getType())->getElementCount() ==
cast<VectorType>(DataTy)->getElementCount(),
"masked_store: vector mask must be same length as data", Call);
break;
}