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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 05:00:11 PDT 2020


Author: David Sherwood
Date: 2020-06-08T12:38:14+01:00
New Revision: cda166c37ce98b0934c9c4780ad39ce6885da724

URL: https://github.com/llvm/llvm-project/commit/cda166c37ce98b0934c9c4780ad39ce6885da724
DIFF: https://github.com/llvm/llvm-project/commit/cda166c37ce98b0934c9c4780ad39ce6885da724.diff

LOG: [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

Added: 
    

Modified: 
    llvm/lib/IR/Verifier.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index eae7c03d744e..7b13b7f9c1c5 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -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;
   }


        


More information about the llvm-commits mailing list