@@ -686,8 +686,6 @@ static Type extractVectorElementType(Type type) {
686686 return vectorType.getElementType ();
687687 if (auto scalableVectorType = llvm::dyn_cast<LLVMScalableVectorType>(type))
688688 return scalableVectorType.getElementType ();
689- if (auto fixedVectorType = llvm::dyn_cast<LLVMFixedVectorType>(type))
690- return fixedVectorType.getElementType ();
691689 return type;
692690}
693691
@@ -724,20 +722,19 @@ static void destructureIndices(Type currType, ArrayRef<GEPArg> indices,
724722 if (rawConstantIndices.size () == 1 || !currType)
725723 continue ;
726724
727- currType =
728- TypeSwitch<Type, Type>(currType)
729- .Case <VectorType, LLVMScalableVectorType, LLVMFixedVectorType,
730- LLVMArrayType>([](auto containerType) {
731- return containerType.getElementType ();
732- })
733- .Case ([&](LLVMStructType structType) -> Type {
734- int64_t memberIndex = rawConstantIndices.back ();
735- if (memberIndex >= 0 && static_cast <size_t >(memberIndex) <
736- structType.getBody ().size ())
737- return structType.getBody ()[memberIndex];
738- return nullptr ;
739- })
740- .Default (Type (nullptr ));
725+ currType = TypeSwitch<Type, Type>(currType)
726+ .Case <VectorType, LLVMScalableVectorType, LLVMArrayType>(
727+ [](auto containerType) {
728+ return containerType.getElementType ();
729+ })
730+ .Case ([&](LLVMStructType structType) -> Type {
731+ int64_t memberIndex = rawConstantIndices.back ();
732+ if (memberIndex >= 0 && static_cast <size_t >(memberIndex) <
733+ structType.getBody ().size ())
734+ return structType.getBody ()[memberIndex];
735+ return nullptr ;
736+ })
737+ .Default (Type (nullptr ));
741738 }
742739}
743740
@@ -838,11 +835,11 @@ verifyStructIndices(Type baseGEPType, unsigned indexPos,
838835 return verifyStructIndices (elementTypes[gepIndex], indexPos + 1 ,
839836 indices, emitOpError);
840837 })
841- .Case <VectorType, LLVMScalableVectorType, LLVMFixedVectorType,
842- LLVMArrayType>( [&](auto containerType) -> LogicalResult {
843- return verifyStructIndices (containerType.getElementType (), indexPos + 1 ,
844- indices, emitOpError);
845- })
838+ .Case <VectorType, LLVMScalableVectorType, LLVMArrayType>(
839+ [&](auto containerType) -> LogicalResult {
840+ return verifyStructIndices (containerType.getElementType (),
841+ indexPos + 1 , indices, emitOpError);
842+ })
846843 .Default ([&](auto otherType) -> LogicalResult {
847844 return emitOpError ()
848845 << " type " << otherType << " cannot be indexed (index #"
@@ -3108,16 +3105,14 @@ OpFoldResult LLVM::ZeroOp::fold(FoldAdaptor) {
31083105// ===----------------------------------------------------------------------===//
31093106
31103107// / Compute the total number of elements in the given type, also taking into
3111- // / account nested types. Supported types are `VectorType`, `LLVMArrayType` and
3112- // / `LLVMFixedVectorType`. Everything else is treated as a scalar.
3108+ // / account nested types. Supported types are `VectorType` and `LLVMArrayType`.
3109+ // / Everything else is treated as a scalar.
31133110static int64_t getNumElements (Type t) {
31143111 if (auto vecType = dyn_cast<VectorType>(t))
31153112 return vecType.getNumElements () * getNumElements (vecType.getElementType ());
31163113 if (auto arrayType = dyn_cast<LLVM::LLVMArrayType>(t))
31173114 return arrayType.getNumElements () *
31183115 getNumElements (arrayType.getElementType ());
3119- if (auto vecType = dyn_cast<LLVMFixedVectorType>(t))
3120- return vecType.getNumElements () * getNumElements (vecType.getElementType ());
31213116 assert (!isa<LLVM::LLVMScalableVectorType>(t) &&
31223117 " number of elements of a scalable vector type is unknown" );
31233118 return 1 ;
@@ -3135,8 +3130,6 @@ static bool hasScalableVectorType(Type t) {
31353130 }
31363131 if (auto arrayType = dyn_cast<LLVM::LLVMArrayType>(t))
31373132 return hasScalableVectorType (arrayType.getElementType ());
3138- if (auto vecType = dyn_cast<LLVMFixedVectorType>(t))
3139- return hasScalableVectorType (vecType.getElementType ());
31403133 return false ;
31413134}
31423135
@@ -3216,8 +3209,7 @@ LogicalResult LLVM::ConstantOp::verify() {
32163209 << " scalable vector type requires a splat attribute" ;
32173210 return success ();
32183211 }
3219- if (!isa<VectorType, LLVM::LLVMArrayType, LLVM::LLVMFixedVectorType>(
3220- getType ()))
3212+ if (!isa<VectorType, LLVM::LLVMArrayType>(getType ()))
32213213 return emitOpError () << " expected vector or array type" ;
32223214 // The number of elements of the attribute and the type must match.
32233215 int64_t attrNumElements;
@@ -3466,8 +3458,7 @@ LogicalResult LLVM::BitcastOp::verify() {
34663458 if (!resultType)
34673459 return success ();
34683460
3469- auto isVector =
3470- llvm::IsaPred<VectorType, LLVMScalableVectorType, LLVMFixedVectorType>;
3461+ auto isVector = llvm::IsaPred<VectorType, LLVMScalableVectorType>;
34713462
34723463 // Due to bitcast requiring both operands to be of the same size, it is not
34733464 // possible for only one of the two to be a pointer of vectors.
@@ -3883,7 +3874,6 @@ void LLVMDialect::initialize() {
38833874
38843875 // clang-format off
38853876 addTypes<LLVMVoidType,
3886- LLVMPPCFP128Type,
38873877 LLVMTokenType,
38883878 LLVMLabelType,
38893879 LLVMMetadataType>();
0 commit comments