Skip to content

Commit

Permalink
[SVE] Remove getNumElements() calls in Verifier::visitIntrinsicCall
Browse files Browse the repository at this point in the history
Replace getNumElements() with getElementCount() when asserting that
two types have the same element counts.

Differential Revision: https://reviews.llvm.org/D81371
  • Loading branch information
david-arm committed Jun 8, 2020
1 parent 4c50cf9 commit cda166c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llvm/lib/IR/Verifier.cpp
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit cda166c

Please sign in to comment.