[llvm] b43791e - [SVE] Remove bad calls to VectorType::getNumElements() from PowerPC

Christopher Tetreault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 15:15:34 PDT 2020


Author: Christopher Tetreault
Date: 2020-08-03T15:15:20-07:00
New Revision: b43791e7016d04c0dcc0d36bb43b8e96110608c9

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

LOG: [SVE] Remove bad calls to VectorType::getNumElements() from PowerPC

Differential Revision: https://reviews.llvm.org/D85154

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index 04b3dceae475..8434fdebe1b0 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -113,7 +113,7 @@ PPCTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
     // the permutation mask with respect to 31 and reverse the order of
     // V1 and V2.
     if (Constant *Mask = dyn_cast<Constant>(II.getArgOperand(2))) {
-      assert(cast<VectorType>(Mask->getType())->getNumElements() == 16 &&
+      assert(cast<FixedVectorType>(Mask->getType())->getNumElements() == 16 &&
              "Bad type for intrinsic!");
 
       // Check that all of the elements are integer constants or undefs.


        


More information about the llvm-commits mailing list